Forum Moderators: phranque
http://dogwalker.co.nz/dogwalkers/search/Auckland/1000/ ("Auckland" is the search word), but when I type in an address that is more complex, with a comma for example ("Greenlane, Auckland"), The resulting URL of http://dogwalker.co.nz/dogwalkers/search/Greenlane%2C+Auckland/1000/ gives me this error on a blank page:
# -- LG .htaccess Generator Start --
# .htaccess generated by LG .htaccess Generator v1.0.0
# http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/
# secure .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Dont list files in index pages
IndexIgnore *
# EE 404 page for missing pages
ErrorDocument 404 /index.php?/
# Simple 404 for missing files
<FilesMatch "(\.jpe?g|gif|png|bmp)$">
ErrorDocument 404 "File Not Found"
</FilesMatch>
RewriteEngine On
RewriteBase /
# remove the www
RewriteCond %{HTTP_HOST} ^(www\.$) [NC]
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Add a trailing slash to paths without an extension
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^(.*)$ $1/ [L,R=301]
# Remove index.php
# Uses the "include method"
# http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/(includes|pages|dogwalkers|parks||members|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Remove IE image toolbar
<FilesMatch "\.(html|htm|php)$">
Header set imagetoolbar "no"
</FilesMatch>
# -- LG .htaccess Generator End --
RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteRule ^(.*)$ /index.php/$1 [L]
# -- LG .htaccess Generator Start --
# .htaccess generated by LG .htaccess Generator v1.0.0
# http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/
# Tuned and tweaked by the good folks at webmasterworld.com
#
# secure .htaccess, htpasswd, and htgroup file
<FilesMatch "\.(htaccess|htpasswd|htgroup)$">
Order allow,deny
Deny from all
</FilesMatch>
#
# Don't list files in directory indexes
IndexIgnore *
#
# Declare EE 404 error document for missing pages
ErrorDocument 404 /index.php?/
#
# Declare simple/short 404 error response for missing image files
<FilesMatch "\.(jpe?g|gif|png|bmp|ico)$">
ErrorDocument 404 "File Not Found"
</FilesMatch>
#
RewriteEngine On
RewriteBase /
#
# Externally redirect to add a trailing slash to paths without an extension which do not resolve to an
# existing file. (Note major performance improvement by skipping 'exists' check when not necessary,
# and prevention of an infinite redirect loop if the "home page" accidentally goes missing)
RewriteCond $1 !(\.[a-z0-9]{1,8}|/)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ http://example.com/$1/ [NE,R=301,L]
#
# Externally redirect non-canonical "www" hostname requests, non-www FQDN hostname requests,
# and non-www hostname requests with appended port numbers to the canonical non-www hostname
RewriteCond %{HTTP_HOST} ^(www\.example\.com|example\.com(\.|\.?:[0-9]+)$) [NC]
RewriteRule ^(.*)$ http://example.com/$1 [NE,R=301,L]
#
# Internally rewrite specified extensionless URL-paths to index.php if
# they do not resolve to existing files. Uses the "include method"
# http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
# (Modified for performance and to prevent rewriting htaccess, htpasswd, and htgroup requests)
RewriteCond $1 !\.[a-z0-9]{1,8}$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((includes|pages|dogwalkers|parks||members|P[0-9]{2,8}).*)$ /index.php?/$1 [NC,NE,L]
#
# Send HTTP response header to disable IE image toolbar
<FilesMatch "\.(html?|php)$">
Header set imagetoolbar "no"
</FilesMatch>
#
# -- LG .htaccess Generator End --
Not Implemented
The page you are looking for cannot be displayed because a header value in the request does not match certain configuration settings on the Web server.
Web Server at dogwalker.co.nz
Which brings me to the last problem I was getting on my PHP files: No input file specified. This started another round of fruitless internet searches. The bottom line is that this meant that PHP couldn't execute the file. Well, another stat command on the file in question showed:
Access: (0660/-rw-rw----) Uid: (1000/ someuser) Gid: ( 2000/ somegroup)
but more importantly neither the owner nor group for the file was associated with the suexec user that was being used for mod_fcgid. A quick chown -R suexecuser:suexecgroup command later on the folder holding my http files (-R makes it recursive) and my PHP file was working like a charm. Just make sure you replace suexecuser and suexecgroup with your actual suexec user and group (this is specified in my /var/www/vhosts/yourdomain.com/conf/vhost.conf file).
Since this is apparently an EE requirement, I'm going to guess that the EE script is not properly decoding multiply-encoded characters in the query string. The "rules" about which characters are allowed in URL-paths differ from those which are allowed in query strings, and this encoding/decoding problem comes up fairly often because no-one bothers to read the HTTP/1.1 specification, and they do not realize that we Webmasters are NOT free to use "any characters, anywhere that we wish" in URLs and query strings.