RewriteEngine on # Index Page RewriteRule ^$ /includes/validate.inc.php RewriteRule ^index.php$ /includes/validate.inc.php # Region Pages RewriteRule ^restaurants/other/$ /other.php?%{QUERY_STRING} [NC] RewriteRule ^restaurants/other/list/$ /index2.php?%{QUERY_STRING} [NC] RewriteRule ^restaurants/other/([^/]+)/$ /Restaurants/view.php?s=other&r=$1&%{QUERY_STRING} [NC] RewriteRule ^restaurants/([^/]+)/$ /index2.php?s=$1 [NC] # Restaurant Pages RewriteRule ^id/([0-9]+)$ /Restaurants/view.php?rid=$1 [NC] [L] RewriteRule ^restaurants/([^/]+)/([^/]+)/([^/]+)/page([0-9]+) /Restaurants/view.php?s=$1&r=$2&m=$3&p=$4&%{QUERY_STRING} [NC] [L] RewriteRule ^restaurants/([^/]+)/([^/]+)/page([0-9]+) /Restaurants/view.php?s=$1&r=$2&p=$3&%{QUERY_STRING} [NC] RewriteRule ^restaurants/([^/]+)/([^/]+)/ /Restaurants/view.php?s=$1&r=$2 [NC] # Search RewriteRule ^search/restaurants/([^/]+)/$ /Restaurants/search.php?s=$1%{QUERY_STRING} [NC] RewriteRule ^search/restaurants/([^/]+)/page([0-9]+) /Restaurants/search.php?s=$1&p=$2&%{QUERY_STRING} [NC] # Offers RewriteRule ^offers/restaurants/([^/]+)/$ /special-offers/offers.php?s=$1%{QUERY_STRING} [NC] RewriteRule ^offers/restaurants/([^/]+)/page([0-9]+) /special-offers/offers.php?s=$1&p=$2&%{QUERY_STRING} [NC]