I have a simple rewrite that changes
http://website.com/page.php?id=1
into
http://website.com/page/1
using the following rewrite
RewriteRule ^page/(\d+)/?$ /page.php?id=$1 [L]
The rewrite works, it displays the page (i don't get a 404), but it doesn't appear to be passing through the id from the URL.
To test this I basically echoed the $_GET['id'] and nothing was returned.
Does anyone know why I might be going wrong?
Many thanks
This is most likely due to enabling of MultiViews
which runs before mod_rewrite
and rewrites /page to /page.php
.
Add this line on top of your .htaccess to disable it:
Options -MultiViews
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With