Log in

View Full Version : htaccess question


Boofo
04-26-2006, 05:44 PM
Does anyone know what I need to add to the htaccess file to re-direct a few URLs to another URL?

I, Brian
04-27-2006, 06:42 AM
It depends how complicated you need to make the redirects.

If you're talking about simply redirecting from one URL to another, because the original has been deleted, then something like this in your .htaccess fil should work fine:


Redirect permanent /forum/showthread.php?t=114135 https://vborg.vbsupport.ru/showthread.php?t=114200


It simply lists the relative URL to redirect from, and the absolute URL to redirect to.

That presumes you are running your forums in the subfolder "forum" and that the forum URL is vbulletin.org. :)

Simply change these as appropriate - for example, if your forum is installed at the root, simply remove the forum subfolder.

Boofo
04-27-2006, 06:51 AM
It depends how complicated you need to make the redirects.

If you're talking about simply redirecting from one URL to another, because the original has been deleted, then something like this in your .htaccess fil should work fine:


Redirect permanent /forum/showthread.php?t=114135 https://vborg.vbsupport.ru/showthread.php?t=114200


That presumes you are running your forums in the subfolder "forum" and that the forum URL is vbulletin.org. :)

Simply change these as appropriate - for example, if your forum is installed at the root, simply remove the forum subfolder.

I want to redirect from the forums dir to the forum dir. I also have one named boards that I want to redirect to forum.

SaN-DeeP
04-27-2006, 11:37 AM
Redirect forums to forum dir
RewriteRule ^forums.* http://www.yourdomain.com/forum [L,R=301]

If you want to re-direct your named boards to forum folder this will work for you.
in your named baords root .htaccess file place this:

RewriteEngine on
RewriteRule ^([/]+)$ forum/$1 [L,R=301]

make sure you test the .htaccess re-direction rules thoroughly before making your site live, you can try using this link to test your redirects:
http://www.webconfs.com/redirect-check.php

Boofo
04-27-2006, 12:08 PM
Redirect forums to forum dir
RewriteRule ^forums.* http://www.yourdomain.com/forum [L,R=301]

If you want to re-direct your named boards to forum folder this will work for you.
in your named baords root .htaccess file place this:

RewriteEngine on
RewriteRule ^([/]+)$ forum/$1 [L,R=301]

make sure you test the .htaccess re-direction rules thoroughly before making your site live, you can try using this link to test your redirects:
http://www.webconfs.com/redirect-check.php

Which is the best way to do it? In each named board or in the root htaccess?