Home › Forums › Other › HTACCESS configure › Reply To: HTACCESS configure
September 15, 2014 at 11:06 am
#183112
Participant
Just to clarify, your website needs URLs like this:
http://example.com/page/index.php?id=63
and you want to be able to use URLs like this instead:
http://example.com/page/63
Correct?
The rule you have above would cause an infinite loop. You rewrite “anything” after page/
into “index.php” with a query string… however, “index.php” does qualify as “anything,” so it will trigger the rule again.
Really, you’re look for one or more digits, aren’t you?
RewriteEngine On
RewriteRule page/(\d+)$ /page/index.php?id=$1 [L]