Htaccess Redirect with domain attributes
Posted
by
PHP Bugs
on Server Fault
See other posts from Server Fault
or by PHP Bugs
Published on 2012-08-30T05:02:46Z
Indexed on
2012/08/30
9:41 UTC
Read the original article
Hit count: 199
.htaccess
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>
© Server Fault or respective owner