MyBB Community Forums

Full Version: change forum URL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!
I have my forum on this address: http://iranbiologists.com/
I want to change address to http://forum.iranbiologists.com.

I want to change my htaccess for accessing to previous pages.
for example if a user typed http://site.com/thread-1.html , forum send him to same address in new URL (http://forum.site.com/thread-1.html?)
I need this changes for keeping my pages index in google engine.

How can i do it?
(sorry for my bad English Smile )
1.
move MyBB files to a sub-folder and make a subdomain pointing to the sub-folder

open /inc/settings.php file in a code editor (eg. notepad++) and put correct (new) values for below variables

$settings['bburl'] = "________________";

$settings['cookiedomain'] = "____________";
$settings['cookiepath'] = "______________";
$settings['cookieprefix'] = "";
save the file

then log into admin panel (new address) and put again correct settings for below at the general configuration settings

Board URL | Cookie Domain | Cookie Path | Cookie Prefix
save the settings

see also cookie related guidance

2.
redirecting from main site to sub-folder can be a difficult task.
what you want to install in the main folder ?
(2013-10-01, 10:24 AM).m. Wrote: [ -> ]1.
move MyBB files to a sub-folder and make a subdomain pointing to the sub-folder

open /inc/settings.php file in a code editor (eg. notepad++) and put correct (new) values for below variables

$settings['bburl'] = "________________";

$settings['cookiedomain'] = "____________";
$settings['cookiepath'] = "______________";
$settings['cookieprefix'] = "";
save the file

then log into admin panel (new address) and put again correct settings for below at the general configuration settings

Board URL | Cookie Domain | Cookie Path | Cookie Prefix
save the settings

see also cookie related guidance

2.
redirecting from main site to sub-folder can be a difficult task.
what you want to install in the main folder ?

thanks but i know them!
this is the main question:
Quote:I want to change my htaccess for accessing to previous pages.
for example if a user typed http://site.com/thread-1.html , forum send him to same address in new URL (http://forum.site.com/thread-1.html?)
I need this changes for keeping my pages index in google engine.

I want to change htaccess for:
if a user click on http://site.com/thread-1.html so redirect to http://sub.site.com/thread-1.html

redirect http://site.com/usercp.php to http://sub.site.com/usercp.php
and ...
redirecting from sub-folder to main folder can be easy as you may not install any new script in the sub-folder

when we need redirect from main folder to sub-folder, care should be taken that unnecessary redirects do not take place

what you want to install in the main folder ?
no thing.
below should work
 Options +FollowSymlinks
 RewriteEngine on
 Rewriterule ^(.*)$ /forum/$1 [r=301,NC] 
thanks for your answers. Smile
I will try this in next days.