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


.



Relevant Pages

  • Re: Making a PHP program look like a directory.
    ... > RewriteEngine On ... Once I worked out that this was for the .htaccess file and not the PHP ... Prev by Date: ...
    (comp.lang.php)
  • The new return of GREEKIE, hehe
    ... now the document is editable via a wiki, and we have a new forum to ... I hope this will ease the edition and more people get into editing ... Slash ... Prev by Date: ...
    (rec.games.roguelike.development)
  • Re: [OT-ish] Looking for PHP behaviour similar to a servlet
    ... RewriteEngine on ... the forward slash and underscore won't match. ... The script name should only ever be alphanumeric or underscores ...
    (comp.lang.php)
  • Re: First Time As Well ;-)
    ... > the last slash at the end of the path. ... What's wrong with using sub? ... Any code in this post is released | A Problem-Solution Approach, ... Prev by Date: ...
    (comp.lang.awk)
  • Re: Menezes Latest: The Cover-up is Running at Full Tilt
    ... > The guy who took a slash should have had a back-up, ... not one of the things which the police consider a public nuisance and ... is something which they are cracking down on? ... Prev by Date: ...
    (uk.legal)