I have a domain (let’s call it http://www.domain.com) that I have it uploaded on a host, where in the host the whole project is located in one folder, (let’s call it FOLDER).
Through the hosting company administration I have set the domain to lead to that folder, and when you visit the site everything is OK, i.e. when you write http://www.domain.com the files are automatically summoned from the folder FOLDER/ from the host.
The .htaccess file, which I use, is in that folder FOLDER, where the index.php file is also located.
I use .htaccess and mod_rewrite for changing the URL, where from
I change it to
Let me highlight that locally mod_rewrite is working perfectly and is not causing any problems.
The problem occurs when the site is uploaded on the net, and when trying to access to
- Code: Select all
The requested URL /folder/index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This whole thing doesn’t make sense because the .htaccess is placed in the folder and not in the root.
According to what I’ve told you, the .htaccess file is trying to find index.php file in a folder that doesn’t suppose to exist, because:
The FOLDER folder which I use to put all of the files, logically is not suppose to be seen by the .htaccess file.
The .htaccess file is trying to find a file (index.php file) in a path which starts from the root of the hosting itself.
and it’s supposed to find folder/index.php
If anyone had a similar problem can you please help me.