ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

index.php - Is it really worth the bother

April 27, 2010 8:10am

Subscribe [6]
  • #1 / Apr 27, 2010 8:10am

    RevaCo

    240 posts

    I’ve tried many methods, first of all I tried a couple of the methods in the wiki article with success I must add. Then I moved over to using Leevi Grahams htaccess generator which worked fine until the recent 1.6.9 update to the pages module.

    I’ve now wondering if it’s really worth the bother of removing index.php, maybe I should just leave index.php in place and let it do its thing. Does Google mind? Do customers mind?

    I noticed that the main EE site does remove it though.

    Thoughts.

  • #2 / Apr 27, 2010 8:30am

    Ingmar

    29245 posts

    Google doesn’t mind at all. Your customers? No idea, it will depend. I consider renaming index.php a viable option in a number of cases.

  • #3 / Apr 27, 2010 9:46am

    Ben Lilley

    214 posts

    I personally remove it because I’m all about the clean URL’s, and like to make things as tidy as possible. More than anything it’s personal preference. Just for the sake or argument here’s my method that has always worked well, I’m not sure if this is the correct way but hey:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]
  • #4 / Apr 27, 2010 10:42am

    stinhambo

    1268 posts

    What Ben said.

    It looks a lot cleaner and more professional in my (and my client’s) opinion.

  • #5 / Apr 27, 2010 11:35am

    Neil Evans

    1403 posts

    I say remove it… and does google mind - officially i would say no - but some of the poor ranking i have seen on sites with it left in makes me wonder if it at minimum waters down your url keyword density. but i am taking that view from a very small sample as i see few sites with it in these days…

  • #6 / Apr 27, 2010 3:15pm

    RevaCo

    240 posts

    Yep, I must agree that it does look better and is worth the effort.

    This all came on the day after where a lot of my pages from the pages module stopped working due to an incompatibility between 1.6.9 and LG htaccess Generator, suppose my frustration got the better of me.

    The fix was easy enough, it was just the phone calls from the customers that lead me to wonder if it was worth the bother.

    Thanks all.

  • #7 / Apr 27, 2010 4:50pm

    grrramps

    2219 posts

    I’ve now wondering if it’s really worth the bother of removing index.php, maybe I should just leave index.php in place and let it do its thing. Does Google mind? Do customers mind?

    Removing index.php is much more problematic on EE than on, say, WordPress.

    Is it worth it? It would be if it were easier to accomplish. On WP it’s usually just a Click and you’re done (server dependent, of course, but WP’s method works on more servers than EE, and with less effort).

    Google absolutely does not care whether index.php is in the URL string or not. It does not matter to SEO.

    Otherwise, there are a few other areas where removing index.php does matter, and could be considered important, but purely on a case-by-case basis.

    First, removing index.php is pretty; especially for Obsessive Compulsive crowd. If you like things neat and tidy, remove it.

    Second, some sites need clean URLs for marketing purposes. It’s better to advertise http://www.mysite.com/promo than it is to advertise http://www.mysite.com/index.php/promo.

    Third, some clients want it removed. End of story.

    What is surprising about removing index.php is how many hoops EE users have to go through to get it done vs. WP users.

  • #8 / Apr 27, 2010 7:42pm

    Neil Evans

    1403 posts

    Google absolutely does not care whether index.php is in the URL string or not. It does not matter to SEO.

    Gramps - careful on what you say! google might not care if you include it or not, then again google does not really care if you put in title tags, or H1 tags - but are they important to SEO, do they make a difference in ranking, even if it is slight - yes, 100%.

    Put simply, index.php in the URL does dilute the keyword density.
    And the early in the URL the keywords are mentioned the better - hence index.php puts it 9 characters further back.

    As i said, slight, but it does make a difference.

  • #9 / Apr 27, 2010 8:21pm

    grrramps

    2219 posts

    As i said, slight, but it does make a difference.

    Slight?

    Yes, but minuscule would be more accurate. Only the SEO charlatans and their minions believe that ‘index.php’ within a URL string actually dilutes keyword density (likewise, so would the domain name, .html, .asp, anything.php) to an appreciable degree on Google (appreciable meaning that anyone can tell the difference between search engine results with and without). That part of SEO has long since passed into the obscure void of diminishing returns.

    That said, I sure wish EE had the same capability as WP to remove index.php from the URL string (for the other reasons stated above). I sometimes feel that EE’s attention to getting 2.0 to a usable condition the past two years has resulted in a tremendous lag behind some of the competition in some areas.

  • #10 / Apr 27, 2010 10:42pm

    Nevin Lyne

    370 posts

    From what I have seen, at least in the past, WP’s removal of index.php was really nothing more than a very slight, but exact same outcome as (though it may have changed at some point):

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]

    With that said I simply like to rename it, which is a very simple process on all but the rarest of server configurations.  But that is just me 😊

    On another note looking across literally thousands of EE sites, its a pretty constant mix of removal, renaming and simply leaving it in.  This is across sites seeing 100’s of visitors a month, to many millions a month and everything in between.

  • #11 / Apr 27, 2010 11:00pm

    grrramps

    2219 posts

    On another note looking across literally thousands of EE sites, its a pretty constant mix of removal, renaming and simply leaving it in.  This is across sites seeing 100’s of visitors a month, to many millions a month and everything in between.

    Nevin, from a technical perspective what is it about WP’s rather simple .htaccess implementation that works on so many server configurations, whereas EE’s more convoluted and multiple methods still cause so many problems?

    I’ve never run into a single server that didn’t work with WP’s implementation right out of the box, but I’ve run into a dozen servers that couldn’t handle any of the EE methods. There must be something about how EE handles file structures that is different that WP.

    UPDATE: I took Nevin’s .htaccess code from above and dropped it into two EE installs; each on a different Linux server. On one, it worked perfectly. All links without index.php worked as expected. Sweet. On the other Linux server (which has never had a configuration that would remove index.php) all links would revert back to the home page.

    Sigh.

  • #12 / Apr 27, 2010 11:26pm

    Nevin Lyne

    370 posts

    Sad part is it has more to do with .htaccess itself rather than EE in all honesty.

    The 2nd linux box for whatever reason, and I can’t actually think of why anyone would not enable it on a *nix/apache web server anyway, does not have AcceptPathInfo turned On.

    Likely will fix the issue and will work actually on both servers, its not as efficient on servers that support AcceptPathInfo:

    change the last line above to be:

    RewriteRule ^(.*)$ /index.php?/$1 [L]

    Odds are it will work on both, of course as long as mod_rewrite is enabled, and if it was not, WP’s removal would not work either…

    There is a big difference between providing a generic removal that will work in the most places and one that is better tuned for a specific need or environment. 

    I can not specifically speak for EllisLab, but from my point of view the problem is if you drop in a generic one likely to work in more places, even if its the least ideal to use, its unlikely anyone will think twice about using it on busy sites.  This is generally where our services are looked at, so I like to focus on speed and compatibility.  As a side note, all 3 ways listed in the Wiki will work on our servers, as an example, and I never did anything special to support them server side.

    Just my two cents.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases