|
Posted by web_design on 08/01/05 01:50
"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:42ed3373$0$30254$dbd4b001@news.euronet.nl...
> web_design wrote:
>> The .htaccess file looks like this now:
>>
>> RewriteEngine On
>> RewriteRule ^(.+)(\.htm)$ /index.php?p=$1 [L]
>>
>> RedirectMatch 301 ^/index.php?p=(.*)$
>> http://www.mywebsite1234.com/$1.htm
>>
>
> Looks cumbersome to me... First you catch all requests that end with a
> .htm suffix, then you redirect them to a php file with a parameter and
> then you redirect to another URL with the htm as file name.
>
> Why don't you just do something like:
>
> RedirectMatch 301 ([^/]+).htm$ http://www.site.com/$1.htm
My problem is that the search engines are spidering two different URLs for
each page, the old dynamic PHP URLs and the new "static" URLs. This is bad
for search engine rankings -- so I want to make sure that if the old dynamic
URLs are requested, the search engines get a "301 permanently moved"
response. Will that last Redirect Match 301 ([^/]+).htm$
http://www.site.com/$1.htm make the PHP URLs hidden? I don't understand the
syntax and am not sure what it will do.
Thanks for you help.
Navigation:
[Reply to this message]
|