Posted by Senator Jay Billington Bulworth on 10/10/62 11:22
"web_design" <web_design@nospam2942043.com> wrote in
news:11efpfkqhcqk26d@corp.supernews.com:
> 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]
>
>
You may need to add a forward slash in front of index.php in the rewrite
directive. If that doesn't work, give this simpler version a shot,
RewriteEngine On
RewriteRule ^(.*).htm /index.php?p=$1
hth
--
Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
Navigation:
[Reply to this message]
|