Htaccess Redirect with domain attributes
- by PHP Bugs
I have to write a redirect rule for the below condition.
www.domain.com/custom.aspx?ATTR=VALUE to
www.domain.com/custom?ATTR=VALUE
How can this be achieved using the .htaccess
I have the below set of codes using on the current .htaccess file. Please also suggest where to include your code.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^api/rest api.php?type=rest [QSA,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
</IfModule>