Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Rewriting & redirecting directory name


jdMorgan - 12:18 am on Feb 7, 2006 (gmt 0)


If the code goes into the top-level directory .htaccess file, then it's:

RewriteRule ^blue-wdget/(.*)$ http://www.example.com/purple-widget/$1 [R=301,L]

Or you can put this code into the .htaccess file in the /blue-widget subdirectory:

RewriteRule ^(.*)$ http://www.example.com/purple-widget/$1 [R=301,L]

The URLs 'seen' by RewriteRule are localized to the current directory, which accounts for the difference.

Jim


Thread source:: http://www.webmasterworld.com/apache/5526.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com