Welcome Guest, Not a member yet? Register   Sign In
have tried everything -> cannot remove index.php from url
#1

[eluser]Unknown[/eluser]
Hello,

I have spent a long time on this issue and I do not know what is wrong.

I need to eliminate 'index.php' from the url.
This url works:
http://72.9.251.2/~stnoa/index.php/admin

but I need this url to work:
http://72.9.251.2/~stnoa/admin

I have read countless posts on the web about the problem and I believe I have done everything that is required and it still does not work.

This page describes the required steps I have taken.

http://codeigniter.com/wiki/mod_rewrite/


1) I have made sure mod_rewrite is working.
2) I have created the .htaccess file with the correct content (according to wiki page above)
3) I have set $config['index_page'] = ""; in config.php


Please help!!!

Thank you!
#2

[eluser]cahva[/eluser]
What error do you get when you go to the page? Is it codeigniter's 404 or webserver's 404 error? If its webserver's 404, then the rewrite is not working.
#3

[eluser]pickupman[/eluser]
You need to make sure your hosting/server allows a .htaccess file, and if mod_rewrite is enabled. If you use in an empty php file:
Code:
echo phpinfo();

You can search what apache modules are installed.
#4

[eluser]Brandon Beasley[/eluser]
You can try using APP_PATH to rewrite URLs:

Rewrite index.php out of the URL using APP_PATH

This is an example of how to use APP_PATH when removing index.php and use vanity URLs. I have found that some hosts will only work with the APP_PATH method.
#5

[eluser]Unknown[/eluser]
Hello,
I was able to solve it like this:

RewriteRule ^(.*)$ http://72.9.251.2/~stnoa/index.php/$1 [L]

now it works.

I think the trouble might be due to the fact that the DNS name servers for the domain have not been configured yet.

Thanks to all who answered!!!




Theme © iAndrew 2016 - Forum software by © MyBB