Hey everyone. Hopefully I can explain this correctly.
I have some URL\'s which I would like to tidy up through URL reWriting. For instance, I have:
domai
Add this to your .htaccess file:
RewriteEngine On
RewriteRule ^page/(\d+)/?$ /index.php?page=$1 [L]
The GET queries will always be executed. If the user types in domain.com/index.php?page=3
, then index.php
will run. If they type in domain.com/page/3
, then mod_rewrite will convert it to domain.com/index.php?page=3
before passing it to PHP. Either way, index.php
is run.