The mod rewrite code that I've tried for this is:
- Code: Select all
RewriteRule ^(.+)$ /index.php?ID=$1
This however is redirecting the example.com/index.php page to example.com/index.php?ID=index.php, and if I go to example.com/something, it causes the page not to redirect properly.
Any help is much appreciated.
edit:
Never mind, I eventually found it:
- Code: Select all
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/]+)/?$ /index.php?ID=$1 [QSA,L]