Web Hosting Talk







View Full Version : htaccess 301 urgent help required!


Bontheone
01-31-2010, 04:47 PM
Hi guys

Im moving my vbulletin v3 forums from a subdirectory to the top level of my domain as vb4

In this case from www.myurl.com/forums/ to www.myurl.com



I need it to redirect from the /forums/ directory, so if people click google links directly to threads ect it will take them to the new correct URL.

An example would be, old URL

www.myurl.com/forums/showthread.php?t=129225

to

www.myurl.com/showthread.php?129225-a-quick-question


How can I add a redirect so every page will do this?

Cheers

mattle
02-01-2010, 12:44 AM
Search this thread for mod_rewrite. I've answered the same question way too many times on this topic....start with a little due diligence before asking for help.

Digit_Canada
02-02-2010, 11:11 PM
place the following in a htaccess file

RewriteEngine On
ReWriteRule ^forums/showthread.php(.*)$ /showthread.php [L]

Dr:linux
02-05-2010, 02:18 AM
Open the .htaccess configuration file inside the forums directory and paste the following code.

# cd /forums
# vi .htaccess

Redirect 301 /forums myurl.com

Now please check and let me know the result.

Feel free to get back if you need any further assistance. Have a nice day.