Web Hosting Talk







View Full Version : mod_rewrite help


NWSTech
04-13-2007, 08:26 AM
hi,
im trying to make my site a little more friendly for search engines and also to add to security of my site, by using mod_rewrite to change the urls to hide what variables are being passed around

currently my 'login.php' uses the following address when you login - - - login.php?loguid=<username>&logpwd=<password>&submit=Submit

the site is designed to work on a mobile phone so ive got to use get vars for that page at least.

the rewrite rule ive tried is

RewriteEngine On

RewriteRule ^login/(.*)/(.*) /login.php?loguid=$1&logpwd=$2

but it just throws me a 500 internal server error

localhost127
04-17-2007, 03:43 PM
Assuming you are running apache:

Make sure that you have AllowOverride set to allow usage of mod_rewrite where you are trying to do it. There doesnt appear to be anything wrong with the rewrite rule, so it is probably giving 500 because you're not allowed to use rewrite there.

NWSTech
04-17-2007, 04:20 PM
i got that working, i was trying it on apache on windows without mod_rewrite support, tried it on my serv and it works, but not i have a problem it does the opposite of what i want, i want the site to rewrite the urls on the fly when users change pages to the new urls, - is that even possible ?