Welcome Guest, Not a member yet? Register   Sign In
Poll: Hide index.php?
You do not have permission to vote in this poll.
yes
54.10%
33 54.10%
no
27.87%
17 27.87%
maybe
18.03%
11 18.03%
Total 61 vote(s) 100%
* You voted for this item. [Show Results]

Remove index.php from URLs?
#1

(This post was last modified: 04-11-2015, 08:45 AM by jlp.)

There are lots of questions about how to remove index.php to make URLs more search-engine friendly.
Should this be done out of the box, rather than providing instructions on how to do it?

CI could come with a .htaccess file inside the document root, and the user guide could then explain how to accomplish the same for non-Apache servers.

--------------------------------
Disclaimer: Putting forward an idea without implying any endorsement of it.
James Parry
Project Lead
Reply
#2

No, lot of servers don't have htaccess support enabled by default and boot of the app like this fails
Reply
#3

You need to have mod_rewrite installed and enabled for this to work. That's not "newbie friendly", because this module is not installed by default when you install Apache. And what about other web server (nginx, IIS...), do they use .htaccess or something else?
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#4

I think the documentation should contain the description how to enable SEF URL's in case of different servers (Apache - .htaccess, IIS - web.config and so on) but the distribution should not contain any of the config files because we don't know what will be the hosting environment. For example the nginx is getting more and more traction in the recent years maybe later on it will surpass Apache's popularity.
Reply
#5

I think that there should be a predefined .htaccess and help document about that and with information how to set it to their server apache and others..

CI should focus on Good Practices and to cover all other cases not the opposite..
Friendly urls are a good practice so they should be our default target.. But of course if its not available CI should work without a problem..
Best VPS Hosting : Digital Ocean
Reply
#6

Here is an interesting answer: http://forum.codeigniter.com/thread-6134...#pid316203
Creation of .htaccess is not newbie friendly, indeed.
Reply
#7

At least have it an option in the config. But totally agree remove it!
Reply
#8

in my opinion we should remove the index.php extension from the website urls. So the users can type it very easily and search engines will display the result correctly.
Reply
#9

(04-15-2015, 11:22 AM)FlexIndie Wrote: At least have it an option in the config. But totally agree remove it!

It's more complicated than an option in the config ! You need a .htaccess file and the mod_rewrite module.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#10

Mmmm this is a difficult one. I think that CodeIgniter should work out-of-the-box in as much setups as possible. On the other hand, this is a typical issue, so I think that there should be some default options here. First of all, the documentation. But, in addition, I think CodeIgniter should come with a default .htaccess or even for other web servers with the index.php removed. For that, maybe we could provide a commented one.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB