Hi, I am working on a project using PHP & MySQL.The Older version of this portal was made by ASP.Net.So that lot of URLs are listed in major search engines with .ASPX page. Now I want to rewrite it in PHP as .aspx, Now my problem is how to write a rewrite rule for the following URLs. http://www.mydomain.com/Product1.aspx http://www.mydomain.com/Product2.aspx http://www.mydomain.com/Product3.aspx http://www.mydomain.com/Product4.aspx .... .... .... ....
You can rewrite: RewriteRule (.*)\.aspx /$1.php?{%QUERY_STRING} Code (markup): Or get Apache to handle aspx as PHP scripts by adding this line to .htaccess: AddType application/x-httpd-php .aspx Code (markup):