ThaLyric
09-07-06, 04:43 AM
Hi,
I've got a strange problem.
I've created a .htaccess to handle error documents :
ErrorDocument 404 http://www.mydomain.nl/index.php
ErrorDocument 403 http://www.mydomain.nl/index.php
This works fine. But when I tye to access a .php file that doesn't exists (for example http://www.mydomain.nl/hahahahahahaha.php) I get the error :
No input file specified.
The website is hosted on a shared hosting, so I can't modify for example php.ini.
So after some research I came up with :
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ http://www.mydomain.nl/index.php
So now when I access http://www.mydomain.nl/hahahahahahaha.php it redirects me to index.php ... that's good ... but wait ... why did I post here?
I've also got folder for example /forum/ (http://www.mydomain.nl/forum/). When I try that it redirects me to index.php. That was not supposed to happen.
Ho can help me on this? I only want a redirect when a .php file is served that isn't on the server.
I've got a strange problem.
I've created a .htaccess to handle error documents :
ErrorDocument 404 http://www.mydomain.nl/index.php
ErrorDocument 403 http://www.mydomain.nl/index.php
This works fine. But when I tye to access a .php file that doesn't exists (for example http://www.mydomain.nl/hahahahahahaha.php) I get the error :
No input file specified.
The website is hosted on a shared hosting, so I can't modify for example php.ini.
So after some research I came up with :
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ http://www.mydomain.nl/index.php
So now when I access http://www.mydomain.nl/hahahahahahaha.php it redirects me to index.php ... that's good ... but wait ... why did I post here?
I've also got folder for example /forum/ (http://www.mydomain.nl/forum/). When I try that it redirects me to index.php. That was not supposed to happen.
Ho can help me on this? I only want a redirect when a .php file is served that isn't on the server.