Redirecting URL's, .htaccess rules.

neosis666 used Ask the Experts™
Hi there.

I have a problem with an upgrade of our vbulletin forums currently in progress with moving the directory and then re-directing any people who click old links, but not so it will just redirect them to the new site, but the corresponding thread on the new site.

For example.
would redirect to

But as you know, vbulletin has many URL's like this, for example
would also redirect to

So what im asking can I make it so any URL that people attempt to go to at the forums directory will automatically redirect them to the new directory.
will redirect to|THAT|IS|PUT|HERE

finally, the files and folders in the forums directory will be moved away from this directory, I assume that the htaccess rules will still correct the URL's even though there are no files or folders in the /forums/ directory anymore?

Many thanks

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010
Try something along the following lines, in the root htdocs  .htaccess on your Original site:

RewriteEngine on
RewriteBase /
RewriteRule forums/(.*) $$1  [R=301,L]

or if both version are on the same server the following rule may work:

RewriteRule forums/(.*) $   /$1  [R=301,L]


Perfect thankyou, though we have gone with another option of leaving the forums in the directory and moving the other feaures of the site away.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial