Click to See Complete Forum and Search --> : rewrite problem?


mahfooz
04-16-2007, 07:55 AM
i have the following URL

domain.com/index.php?action=reserve&tp=1
and trying to rewrite it as

domain.com/reserve/1

here is my htacces code, is there any one know what is the problem with this??

RewriteRule ^([^/\.]+)/([^/\.]+)/?$ index.php?action=$1&tp=$2 [L]

jasonahoule
04-16-2007, 08:52 AM
Here, try this:

RewriteRule ^([A-Za-z]+)/([0-9])(/)?$ /index.php?action=$1&tp=$2

mahfooz
04-16-2007, 09:02 AM
its not working

actually i m testing it on localhost under some directory u may call it testrewrite

as

localhost/testrewrite/index.php?action=reserve&tp=1

jasonahoule
04-16-2007, 09:40 AM
RewriteRule ^/testrewrite/([A-Za-z]+)/([0-9])(/)?$ /testrewrite/index.php?action=$1&tp=$2