Rewriting URLs -- problem



I am trying to rewrite my PHP URLs from something like this:

www.mywebsite1234.com?p=contact
or www.mywebsite1234.com?p=page2

to

www.mywebsite1234.com/contact.htm
or www.mywebsite1234.com/page2.htm (etc.)

The following .htaccess code was recommended to me but it's not working. I
read some more tutorials and I can't figure out what the problem is. Anyone
have any ideas?

RewriteEngine On
RewriteRule ^(.+)(\.htm)$ index.php?p=$1 [L]


.



Relevant Pages

  • Re: Rewriting URLs -- problem
    ... > I am trying to rewrite my PHP URLs from something like this: ... You may need to add a forward slash in front of index.php in the rewrite ... Prev by Date: ...
    (alt.php)
  • Re: Rewriting URLs -- problem
    ... >> I am trying to rewrite my PHP URLs from something like this: ... > You may need to add a forward slash in front of index.php in the rewrite ... Prev by Date: ...
    (alt.php)
  • Re: Rewriting URLs -- problem
    ... >I am trying to rewrite my PHP URLs from something like this: ... I made a mistake there: the original URLs look like this: ... Prev by Date: ...
    (alt.php)
  • Re: Select Case vs. ElseIf
    ... mainainability in the process. ... then a separate block for Y finishes the job. ... you can rewrite it like this... ... Prev by Date: ...
    (comp.databases.ms-access)
  • Re: Punctuation and/or Wording Help Needed --- Badly :-)
    ... > Here's my rewrite (I've left the word "mysical" as in the original, ... > Doors can be excellent symbols of mysical knowledge: ... Who, or what, would be doing the imposing? ... Prev by Date: ...
    (alt.usage.english)