Forum Moderators: phranque

Message Too Old, No Replies

.htaccess not working :(

Page not diplaying properly

         

audiboy

10:41 am on Jul 1, 2005 (gmt 0)

10+ Year Member



Hi There,

I currently have a line in my htaccess file

RewriteRule ^([^.]+)-([^.]+)-phone.php producttest.php?make=$1&model=$2

Which when I type in nokia-1100-phone.php it comes up with all the correct page details and displays perfectly BUT when i put in nokia-n90-phone.php it comes up with none of the phone details.. The phone is defintely in the database so I cant see why its not working :( can anyone help?

Thanks,
Chris

ckarg

1:56 pm on Jul 1, 2005 (gmt 0)

10+ Year Member



Try the RewriteLog and RewriteLogLevel directives to give you more insight into what's going on.

jdMorgan

1:35 am on Jul 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your rule does not look correct. Specifically, the negative match characters do not match your delimiter. Try:

RewriteRule ^([^-]+)-([^-]+)-phone.php producttest.php?make=$1&model=$2 [L]

See the mod_rewrite and regular-expressions documents cited in our forum charter for more information.

Jim

audiboy

8:12 am on Jul 6, 2005 (gmt 0)

10+ Year Member



Hi, Thanks for your reply, i tried what you said but it is still not working :S

Ill have a look around the forum for threads on htaccess and mod rewrite thanks.