... htaccess rewrite rule ...



• .htaccess rewrite rule »»


Hi folks,

I'm moving a component of a website from a subfolder into the root.

So www.mysite.com/subfolder/page1.html

becomes

www.mysite.com/page1.html

However, I want the old links to continue working (becuase Google has indexed them, among other reasons).

What should the rewrite rule look like?

I've tried the following:

RewriteRule ^subfolder/(.*)$ $1

This works on my localhost installation, but not on my web host installation. Other rewrite rules are working fine.

Any ideas?

Thanks in advance
 Bookmark with:            
Source: IrishWebMasterForums | pub: 22 Jul 2008 by: WoodenToysie | added: 22 Jul 2008 | cat: Coding Help | views: 24 time/s
Related Articles...
Leave a Comment...
Name: *
Email: *
Comment: *
Security Code: security code
*
     Remember me:
Categories
Channels
Press Release