Reputation: 23
I need to Rewrite http://www.domain.net/img.php?id=example.jpg to http://www.domain.net/index.php?id=example.jpg
example.jpg is changing. I am not common with htaccess syntax. Can someone help me please?
Upvotes: 1
Views: 40
Reputation: 785156
Enable mod_rewrite
and .htaccess
through httpd.conf
(if not already enabled) and then put this code in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteRule ^img\.php$ /index.php [L,NC]
QUERY_STRING will automatically be carried over to /index.php
Upvotes: 2