I bought weeks ago 4 sites, as I checked today my awstats, noticed tons of error hits. http://www.guttersbowlingdirectory.com/illinois-bowling-alleys/ - Good http://www.guttersbowlingdirectory.com/illinois-bowling-alleys - The requested URL /illinois-bowling-alleys was not found on this server. It's really annoying to see bots error hits. If somebody knows the solution please help me out. Thanks Nilgesz
Thanks for fast replies! RewriteEngine On RewriteBase / RewriteRule ^([^/]*)/([/]*)$ /cities.php?cid=$1 RewriteRule ^(.+-bowling-alleys)/([^/]*)$ /listings.php?cid=$1&uid=$2 RewriteRule ^(.+-bowling-alleys)/(.+)/(.+)$ /business.php?cid=$1&uid=$2&wid=$3 This is the htaccess file.
I would add this line to your .htaccess file RewriteRule ^(.+-bowling-alleys)$ /listings.php?cid=$1 That should fix it. If not pm me I'll help you get it fixed
Thanks! something changed. It wont gives error message now and still don't show the listings without "/" http://www.guttersbowlingdirectory.com/illinois-bowling-alleys/ http://www.guttersbowlingdirectory.com/illinois-bowling-alleys
Ok what is happening is the trailing slash is needed for the php script. So here is another suggestion. RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R] So your htaccess file would look like this RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R] RewriteRule ^([^/]*)/([/]*)$ /cities.php?cid=$1 RewriteRule ^(.+-bowling-alleys)/([^/]*)$ /listings.php?cid=$1&uid=$2 RewriteRule ^(.+-bowling-alleys)/(.+)/(.+)$ /business.php?cid=$1&uid=$2&wid=$3 Notice the new RewriteCond line. That will check to see if there is a trailing slash and then the next line will add one if the / is not there. You can view this apache doc page. http://httpd.apache.org/docs/1.3/misc/rewriteguide.html Hope this time we've helped to clear up this problem for you.