I'm attempting to rewite URL's like this: http://www.domain.com/gourmet/cookbook/appetizer-20.html to look like this: http://www.domain.com/gourmet/cookbook/viewrecipes.php?page=20&category=appetizer The .httacess file is located in the /gourmet/cookbook/ directory and looks like this: Options +FollowSymLinks ReWriteEngine on RewriteRule ^gourmet/cookbook/([a-z]+)-([0-9]+)\.html$ /gourmet/cookbook/viewrecipes\.php?page=$2&category=$1 [L] I've also tried other variations of the rule: RewriteRule ^([a-z]+)-([0-9]+)\.html$ /gourmet/cookbook/viewrecipes\.php?page=$2&category=$1 [L] and RewriteRule ^([a-z]+)-([0-9]+)\.html$ viewrecipes\.php?page=$2&category=$1 [L] Still not working. Can anyone suggest a tweak? Also, are there any directives that will allow me to see the rewritten URL? That might make it easier to figure out. Thanks Mike
The last one looks like your best option. The only problem I can see is the \ in viewrecipes\.php The rewrite destination cannot contain any regex for obvious reasons and as such the period has no special meaning that would need escaping. Other than that, looks fine. You can add a R flag to the rule so that it'll send a location header and update your address bar, rather than a transparent rewrite on the server side.