Forum Moderators: phranque
RewriteRule ^appraisers/([A-Za-z_]+)/([A-Za-z_-]+)/?$ list_county.php?state=$1&county=$2 [L,QSA]
But I need to allow apostrophes in certain parts of the url. I tried both of the following rewriterules and both gave 500 Internal Server Errors:
RewriteRule ^appraisers/([A-Za-z_]+)/([A-Za-z_-']+)/?$ list_county.php?state=$1&county=$2 [L,QSA]
RewriteRule ^appraisers/([A-Za-z_]+)/([A-Za-z_-\']+)/?$ list_county.php?state=$1&county=$2 [L,QSA]
How do I make mod_rewrite allow apostrophes?
RewriteCond %{REQUEST_URI} \%27
RewriteCond %{REQUEST_URI} ^/appraisers/([a-z_]+)/(([a-z_\-]¦\%27)+)/?$ [NC]
RewriteRule ^appraisers/ list_county.php?state=%1&county=$2 [QSA,L]
Jim
RewriteRule ^appraisers/([a-z_]+)/(([a-z_-]¦')+)/?$ list_county.php?state=$1&county=$2 [NC,QSA,L]
For those reading later: Replace the broken pipe "¦" character above with a solid pipe before use; posting on this forum modifies that character.
Jim