Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Another 301 Redirect Question.


lucy24 - 10:16 pm on Oct 22, 2011 (gmt 0)


You need to get a firm grip on the difference between mod_alias (what you're using here) and mod_rewrite.

One key difference: Redirects made using mod_alias will reappend the rest of the path. So when you say

Redirect 301 / http://www.example.com/

it really means

Redirect 301 {/blahblah} http://www.example.com{/sameblahblah}

There are times when mod_alias is appropriate* but what you want here is

RewriteEngine On

RewriteRule .* http://www.example.com/ [R=301,L]


* Apache says so. [httpd.apache.org]


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