Rewrite not working?

New to mod_rewrite? This is a good place to start.

Rewrite not working?

Postby wwfc_barmy_army » Fri Aug 14, 2009 5:34 am

Hi.

I have this htaccess rewrite:
Code: Select all
Options +FollowSymLinks
RewriteEngine on

RewriteRule ^([0-9]+)/([0-9]+)$ index.php?width=$1&height=$2


I keep getting a 500 error tho. I'm looking to do this kind of rewrite:

mydomain.com/index.php?width=100&height=200
to
mydomain.com/100/200

Any ideas?

Thanks.
wwfc_barmy_army
 
Posts: 7
Joined: Fri Aug 14, 2009 5:32 am

Postby richardk » Fri Aug 14, 2009 1:27 pm

Try removing the Options line
Code: Select all
RewriteEngine On

RewriteRule ^([0-9]+)/([0-9]+)$ /index.php?width=$1&height=$2 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby wwfc_barmy_army » Sat Aug 15, 2009 12:26 am

mod_rewrite was switched off on my dev machine :-? Stupid mistake. Thanks anyways.
wwfc_barmy_army
 
Posts: 7
Joined: Fri Aug 14, 2009 5:32 am


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 41 guests

cron