Problem with mod_rewrite

Links for php scripts

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Mon Jul 04, 2011 11:10 pm

Problem with mod_rewrite

Postby zlatkoristevski » Fri Jul 08, 2011 12:47 am

I have this problem,
I have a domain (let’s call it 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 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

it shows:

Code: Select all

Not Found

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.

Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests