I am having a problem with a rewrite that is working in other browsers but not firefox
The Problem is i have to use quotes in the url, i have no alternative due to a clients bad software submitting data to my script.
I encode the quotes in urls using %27 (i have added security in php).
# example.eu/horses/r/rollin-%27n-tumblin/
RewriteRule ^horses/(.*)/(.*)/$ index.php?page=viewHorse&letter=$1&horseName=$2 [L]
This is working (tested on mac & windows 7) in Safari and Chrome but firefox shows “The page isn’t redirecting properly”
p.s It is not a cache issue
I am beginner at rewriting so im hoping the solution is simple but i couldnt work out why this rule worked in other browsers but not firefox
here is .htaccess
RewriteEngine on
RewriteBase /
ErrorDocument 404 /404/
#Commented these out just to see if causing issues
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#RewriteRule ^index.html http://www.example.eu/ [R=301,L]
#RewriteRule ^home.html http://www.example.eu/ [R=301,L]
#RewriteRule ^Home.html http://www.example.eu/ [R=301,L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !index.php
#RewriteCond %{REQUEST_URI} !^message-board/$
#RewriteCond %{REQUEST_URI} !(.*)/$
#RewriteRule ^(.*)$ http://www.example.eu/$1/ [L,R=301]
RewriteRule ^css/(.*)/$ /style.css
RewriteRule ^checkout/failed/$ index.php?page=checkoutFailed [L]
RewriteRule ^checkout/complete/$ index.php?page=checkoutComplete [L]
RewriteRule ^advertise/$ index.php?page=advertise [L]
RewriteRule ^contact/$ index.php?page=contact [L]
RewriteRule ^sales/$ index.php?page=sales [L]
RewriteRule ^news/$ index.php?page=news [L]
RewriteRule ^publications/$ index.php?page=publications [L]
RewriteRule ^generateSitemap/$ index.php?page=generateSitemap [L]
RewriteRule ^fixtures/(.*)/$ index.php?page=view-fixtures&country=$1 [L]
RewriteRule ^fixtures/$ index.php?page=fixtures [L]
RewriteRule ^results/(.*)/(.*)/(.*)/$ index.php?page=view-result&country=$1&date=$2&UniRef=$3 [L]
RewriteRule ^results/(.*)/(.*)/$ index.php?page=cresults&country=$1&date=$2 [L]
RewriteRule ^results/(.*)/$ index.php?page=results&country=$1 [L]
RewriteRule ^results/$ index.php?page=results [L]
RewriteRule ^horses/(.*)/(.*)/$ index.php?page=viewHorse&letter=$1&horseName=$2 [L]
RewriteRule ^horses/(.*)/$ index.php?page=horsesByLetter&letter=$1 [L]
RewriteRule ^horses/$ index.php?page=horsesByLetter [L]
RewriteRule ^search.php index.php?page=search&%{QUERY_STRING} [L]
RewriteRule ^404/$ index.php?page=404 [L]
<FilesMatch "\\.(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$">
Header set Cache-Control "max-age=2992000"
</FilesMatch>
<FilesMatch "\.(js|css|pdf|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
Issue is with FF 16.0.1 on Mac OSX 10.8.2 showing error “The page isn’t redirecting properly”
Turns out i had a canonical 301 script in php that had an issue with url encoding.
I guess firefox encodes the url inside $_SERVER[‘REQUEST_URI’] differently to other browsers but…
Changing ….
in php canonical script to …
made it match the ‘ in url correctly. 🙂