How to redirect a url of the form
localhost/website/xxxx.xxxx
to
localhost/website/index.php?i=xxxx.xxxx
,where x is a number, for example xxxx.xxxx can be 7234.5432. The htaccess file is located in the website folder.
How to redirect a url of the form
localhost/website/xxxx.xxxx
to
localhost/website/index.php?i=xxxx.xxxx
,where x is a number, for example xxxx.xxxx can be 7234.5432. The htaccess file is located in the website folder.
First of all, you need to activate mod_rewrite
then add this to your .htaccess:
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^([0-9]{4}\.[0-9]{4})$ index.php?i=$1