Forum Moderators: phranque
# Block direct access to scripts, text files and images folder
RewriteCond %{REQUEST_URI} ^/cms/inc/menu\.php$ [OR]
RewriteCond %{REQUEST_URI} ^/cms/inc/inmenu\.txt$ [OR]
RewriteCond %{REQUEST_URI} ^/cms/siteadmin/list\.php$ [OR]
RewriteCond %{REQUEST_URI} ^/cms/([^/.]+)\.txt$ [OR]
RewriteCond %{REQUEST_URI} ^/cms/comments/([^/.]+)\.txt$ [OR]
RewriteCond %{REQUEST_URI} ^/img/$
RewriteRule .* - [F]
#
# (1) Intercept and redirect requests that are not for the '/admin/' pages
#
# EXTERNAL REDIRECT 1
# If '/cms/' is at the END of the requested path, redirect to '/'
RewriteCond %{REQUEST_URI} ^/cms/$
RewriteRule ^cms/$ http://example.com/ [R=301,L]
#
# EXTERNAL REDIRECT 2
# If request is 'GET /cms/page.php HTTP/1.1' redirect to '/page'
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /cms/([^/.]+)\.php\ HTTP/
RewriteRule ^cms/([^/.]+)\.php$ http://example.com/$1 [R=301,L]
#
# EXTERNAL REDIRECT 3 (ONLY FOR WEB ROOT)
# For websites beginning with www
# If request does not include www, redirect to URLs with www
# (reversible for non-www websites: redirect from with-www to without)
RewriteCond %{REQUEST_URI} !^/cms/admin/
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
#
# (2) Internal rewrites
#
# INTERNAL REWRITE 1 (home page)
# If request is '/' internal rewrite to '/cms/index.php'
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^$ /cms/index.php [L]
#
# INTERNAL REWRITE 2 (search page)
# If request is 'search?terms=anything' internal rewrite...
# to '/cms/search.php?terms=anything'
RewriteCond %{REQUEST_URI} ^/search$
RewriteCond %{QUERY_STRING} ^terms=(.*)$
RewriteRule ^search(.*)$ /cms/search.php?%1 [L]
#
# INTERNAL REWRITE 3 (other pages)
# If the request is 'GET /page HTTP/1.1' internal rewrite to '/cms/page.php'
RewriteCond %{REQUEST_URI} !^/index$
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/.]+)\ HTTP/
RewriteRule ^([^/.]+)$ /cms/$1.php [L]
The IP address listed above (207.46.13.8) verifies as the msnbot.
perhaps the CMS script is checking for filename existence prior to generating the content.
!-f !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d perhaps the CMS script is checking for filename existence prior to generating the content.
And, like all good error logs, it [!-f] will list the non-existence as an "error"...
Is this something that is server configurable perhaps?