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?
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?
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
[L,NC,QSA] are flags. The L means stop processing any additional rules, the NC means process this case-insensitively, and the QSA means leave the query string intact.