How to remove index.php from my URL |
[eluser]ranjeet_sangle[/eluser]
Hello friends.. I have currently developed a website completely in Codeigniter. The problem is whenever any webpage other than the homepage is displayed the URL of the webpage contains the index.php e.g; htp://abc.com/ //Homepage http://abc.com/index.php/gpr http://abc.com/index.php/alex/page_view Can anybody suggest how to remove index.php from URL. I have not made any changes to the config file yet..
[eluser]xoRiZ[/eluser]
[quote author="ranjeet_sangle" date="1270166490"]Hello friends.. I have currently developed a website completely in Codeigniter. The problem is whenever any webpage other than the homepage is displayed the URL of the webpage contains the index.php e.g; htp://abc.com/ //Homepage http://abc.com/index.php/gpr http://abc.com/index.php/alex/page_view Can anybody suggest how to remove index.php from URL. I have not made any changes to the config file yet..[/quote] http://ellislab.com/codeigniter/user-gui.../urls.html Section: Removing the index.php file You'll need the "AllowOverride" in apache from your host. If you have complications, reply and will see if we can help.
[eluser]ranjeet_sangle[/eluser]
Thanx for ur help..!! Actually I am not allowed to create a .htacess file on my web server. So that this option cant be implemented. Is there any another way for doing so??..
[eluser]xoRiZ[/eluser]
[quote author="ranjeet_sangle" date="1270169918"]Thanx for ur help..!! Actually I am not allowed to create a .htacess file on my web server. So that this option cant be implemented. Is there any another way for doing so??..[/quote] I'm fairly confident that the answer is no, however, someone here may have an alternative approach to accomplish something similar to what you're looking for.
[eluser]adamp1[/eluser]
Why are you not allowed .htaccess file? If you don't have that then I don't think there is another way.
[eluser]mrwilson1[/eluser]
Can this "AllowOverride" for apache be explained briefly so I can contact my host to do it? What exactly am i asking for? Thanks
[eluser]$ilovephp[/eluser]
hmm.., you might consider removing the .php extension.. lols in your cofig file change the base_url to http://www.yourdomain.com/index/ so whenever you use base_url in the redirect function do not include the "index" anymore example: Code: redirect(base_url()."homepage"); i opt to use this since i hate .htaccess
[eluser]mrwilson1[/eluser]
I considered that but was having such a time removing it I didnt do it. Good point though. I copied an .htaccess script Ben has put on here and added allowOveride All. That took the site offline so I removed it and everything worked. Scary Thanks, I appreciate your help |
Welcome Guest, Not a member yet? Register Sign In |