When I use following url rewrite from:
http://www.mapsopensource.com/m.php?url=asia-globe-map
to
http://www.mapsopensource.com/asia-globe-map.html
It rewrites quite well but when I combine this with another rule and try to rewrite the following the result is nothing:
http://www.mapsopensource.com/country.php?countryAlias=usa
to
http://www.mapsopensource.com/usa.html
Please guide me as to how I can combine both url rewrites in one htacess for two or more different dynamic urls.
My current code is:
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /m\.php\?url=(.*)\ HTTP
RewriteRule ^ /%2.html? [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)\.html$ /m.php?url=$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /country\.php\?countryAlias=(.*)\ HTTP
RewriteRule ^ /%2.html? [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)\.html$ /country.php?countryAlias=$1 [L,QSA]