These are the .htaccess files from two of my localhost sites.
Virtual host 1 (mysite1.com):
# this is the initialization
Options +FollowSymLinks
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^news-07/?$ news_01_06_2007.php [NC,L]
# Handle requests for "news"
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)\.php$ $1 [nc]
#RewriteRule ^(.*)\.php$ http://mysite1.com/$1 [R,NC]
However, when I try http://www.mysite1.com/testfile.php - it redirects to http://mysite.com/testfile as it should do, except this message is displayed:
Not Found
The requested URL /testfile was not found on this server.
How can I resolve this error message and ensure my .htaccess file works?
I'm managing to understand .htaccess well, with regard to things like blocking spiders etc. but this one is causing me some problems, anyone know what's wrong and how I can prevent this error happening again in the future?
All help appreciated.