Re: rewriting URLs, part II -- 301 redirect from old dynamic URLs




"Janwillem Borleffs" <jw@xxxxxxxxxxxxx> wrote in message
news:42ecf048$0$4215$dbd45001@xxxxxxxxxxxxxxxxxx
> web_design wrote:
>> Thanks... I added the forward slash but it still isn't working. I
>> think the problem now is in the first part, because it doesn't try to
>> redirect at all. /index.php?p=(.*)$
>>
>
> Try it with an indication of the start of the path as in:
>
> RedirectMatch 301 ^/index.php?p=(.*)$

It's still not working for some reason. Do you think the [L] might be a
problem? Does [R] mean "redirect" and do I need to add that somewhere?

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


.