Forum Moderators: phranque

Message Too Old, No Replies

domain name being prefixed

and screwing up my php script

         

incywincy

10:21 pm on Jun 27, 2004 (gmt 0)

10+ Year Member



hi guys,

i've looked around the site briefly and couldn't find my answer.

i've reimplemented my dynamic site and all urls have changed from

/widget/blue-big.html to
/widget/blue-big.php

i've written a rule and put it into my conf file:
#Redirect any .html requests.
RewriteRule /(.*).html$ /$1\.php [R=301]

this is now causing my script to fail.
i set up a rewrite log file andf it shows that the $1 part of the url has [mydomain.com...] when my script is expecting /widget/blue-big.php

could anyone please point me in the right direction

thanks in advance

gergoe

10:56 pm on Jun 27, 2004 (gmt 0)

10+ Year Member



Try

RewriteRule /(.+)[b]\.[/b]html$ /$1[b].[/b]php [R=301,L]

The first part is a regexp, while the second one isn't, so you need to escape the dots only in the first parameter.
It might not solve your problem, but better to clean things up before doing anything else.
By the way, do you want to rewrite pages within the widgets directory only or every file on the whole website ending with .html?