Removing index.php not working on hosting althougt all conditions true |
Hi,
first of all I know that is a famous problem and I have already tried probably everything and I am just tired after 4 days of fighting. I feel stupid asking that as the next but I am really desperate. The thing is: Removing index.php from URL works fine on localhost (XAMMP) but does not work on hosting (OVH, Apache) i.e. http://example.com/index.php/contact works fine while http://example.com/contact does NOT work. On the server I set "root folder" into "public" folder and it seems working. My application is:
The original .htaccess in "public" folder didn't work on the hosting. A dummy .htaccess like: Quote:RewriteEngine On ...also does not work (neither in "public" nor in "/" folder). I can see only a message "File not found." when I choose Important is that my hosting provider told me "rewrite_mod" work correct on the server. Does anybody know what problem can be? Should .htaccess be placed in "public" or in "/"? Best Regards!
It should be in public.
If you installed CodeIgniter in a subfolder, you will need to set RewriteBase appropriately.
(09-18-2019, 01:36 PM)dave friend Wrote: It should be in public. I tried to manipulate with it, but received only "500 Internal Server Error". Well, it is preconfigored by hosting multipage version, so the app is in a subfolder in fact. But since it is preconfigured on the server I don't think it is a problem.
Hey I found I solution I hope it will work for you.
create new file on root index.php and add below code : <?php include "public/index.php"; ?> now copy your .htaccess file from public and put it on root and thats all it worked for me. |
Welcome Guest, Not a member yet? Register Sign In |