I get an 500 error and when i change back to old one same problem RewriteEngine On RewriteBase / RewriteRule ^company-(.*)\-(.*)\-(.*)\-(.*)\.html$ info.php?id=$1 [L] RewriteRule ^category-\(.*)-\(.*)\.html$ search.php?c=$1 [L] RewriteRule ^subcategory-\(.*)-\(.*)\.html$ search.php?s=$1 [L] RewriteRule ^Addreview-\(.*)-\(.*).html$ Addreview.php?id=$1 [L] RewriteRule ^Viewreview-\(.*)-\(.*).html$ Viewreview.php?id=$1 [L] RewriteRule ^Print-\(.*)-\(.*).html$ print.php?id=$1 [L] RewriteRule ^Friend-\(.*)-\(.*).html$ friend.php?id=$1 [L] RewriteRule ^Email-\(.*)-\(.*).html$ email.php?AgentID=$1&ListingID=$2 [L] RewriteRule ^Images-\(.*).html$ info.php?id=$1&i=2 [L] RewriteRule ^Savelist-\(.*)-\(.*)-\(.*).html$ savelist.php?id=$1&user=$2 [L] RewriteRule ^ArticlesDetails-\(.*)-\(.*).html$ articlesdetails.php?id=$1 [L]
At the first look I see you are escaping ( but not ) You've to write more strict regular condition instead .* Regards Edit: You should carefully check what must be escaped and what must not.
Here is an example: RewriteRule ^Email\-([^\-]+)\-([^\-\.]+)\.html$ email.php?AgentID=$1&ListingID=$2 [L] Code (markup): In your code: you use only $1 of 4 and you are not escaping all special characters. First (.*) is very wide range and includes next -xxx-xxx.html to the end of url. Regards
Now i got a new version but still some of the links do not work RewriteEngine on RewriteBase / RewriteRule ^company\-([^\-]+)\-([^\-]+)\-([^\-]+)\-([^\-\.]+)\.html$ info.php?id=$1 [L] RewriteRule ^Email\-([^\-]+)\-([^\-\.]+)\.html$ email.php?AgentID=$1&ListingID=$2 [L] something wrong?
Company redirects to info.php You can make all these by one line after rewrite condition. First portion: company-xxx-xxx.html points to company.php?xxx and s.o. for each one. So rule must start like:^([^\-]+)-...... and points to $1.php?id=$2&Other=$3 Regards