Jump to content

url problems


snrecords

Recommended Posts

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!

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.