snrecords Posted May 1, 2008 Share Posted May 1, 2008 I can't figure out why ampersands, commas, and apostrophes don't work in my dynamic urls. Please go to http://www.tasteofaloha.com/casual ... and try to click on A&W Restaurant & Long John Silvers ... it doesn't work because of the ampersand. Now try to click on Anna Miller\'s 24 Hr Restaurant ... it doesn't work either. Even with stripslashes it doesn't work. I have redirects coding in where the restaurant name variable is the url. Below is my .htaccess file code: RewriteEngine on RewriteBase / RewriteRule ^oahu/(.+) result.php?island=1&cuisine=$1 [nc] RewriteRule ^maui/(.+) result.php?island=2&cuisine=$1 RewriteRule ^kauai/(.+) result.php?island=3&cuisine=$1 RewriteRule ^big\+\island/(.+) result.php?island=4&cuisine=$1 RewriteRule ^molokai/(.+) result.php?island=5&cuisine=$1 RewriteRule ^lanai/(.+) result.php?island=6&cuisine=$1 RewriteRule ^oahu$ result.php?island=1 RewriteRule ^maui$ result.php?island=2 RewriteRule ^kauai$ result.php?island=3 RewriteRule ^big\+\island$ result.php?island=4 RewriteRule ^molokai$ result.php?island=5 RewriteRule ^lanai$ result.php?island=6 RewriteRule ^([a-z0-9+A-Z]+)$ result.php?cuisine=$1 [nc] Please Help! Quote Link to comment Share on other sites More sharing options...
ucffool Posted May 2, 2008 Share Posted May 2, 2008 Anna Millers is currently working. Your last rewrite is the issue: RewriteRule ^([a-z0-9+A-Z]+)$ result.php?cuisine=$1 [nc] It should be: RewriteRule ^([a-z0-9+A-Z&'_-]+)$ result.php?cuisine=$1 [nc] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.