Reputation: 1
How should I write in htaccess file to rewrite
http://mySite/index.php?id=55 as http://mySite/55 ??
55 is just an example, but it will vary on each id.
Upvotes: 0
Views: 14
Reputation: 41219
In htaccess in the document root
RewriteEngine on
RewriteRule ^([^./]+)$ /index.php?id=$1 [L]
This will allow you to access "/index.php?id=numbr" using "/number" .
Upvotes: 1