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.

remove index.php from urls?

February 22, 2011 10:41pm

Subscribe [2]
  • #1 / Feb 22, 2011 10:41pm

    thefifthlion

    133 posts

    I’m running EE2 on my Mediatemple gridserver (MySQL5.0.32). I’m attempting to add the rewrite code below to my .htaccess file and it doesn’t work. Does anyone know what I might be doing wrong? The “AddHandler…” bit was already added by the server when I switched from PHP 4 to 5. I need help from a guru.

    AddHandler php5-script .php
    
    RewriteEngine On 
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ /index.php/$1 [L]

    Moved to CodeShare Corner by Moderator

  • #2 / Feb 22, 2011 11:00pm

    Cheif

    626 posts

    I use this on most of my sites and works pretty darn well, no idea about MT setups but works on most all standard installs I’ve tried it on.

    # Although highly unlikely, your host may have +FollowSymLinks enabled at the root level, yet disallow its addition in .htaccess; in which case, adding +FollowSymLinks will break your setup (probably a 500 error), so just remove it, and your rules should work fine.
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /
    # Remove index.php
    # Uses the "include method"
    # <a href="http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method">http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method</a>
     RewriteCond %{QUERY_STRING} !^(ACT=.*)$ [NC]
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule ^(.*)$ /index.php/$1 [L]
  • #3 / Feb 23, 2011 11:02am

    Sue Crocker

    26054 posts

    Thanks for the assist, Cheif.

    thefifthlion, unfortunately we can’t provide direct support for removing index.php via .htaccess. However, community members can certainly lend a hand. Moving to the CodeShare Corner for additional community support.

  • #4 / Mar 06, 2011 7:43pm

    thefifthlion

    133 posts

    Sue,

    One more newbie question. If I were to purchase Matrix could I use it for multiple sites or is it a single site license?

  • #5 / Mar 06, 2011 8:54pm

    Sue Crocker

    26054 posts

    As far as I’m aware, Brandon requires a license for each MSM site. So if you had the MSM from us, you’d need three licenses from Brandon.

    That’s not true for every third party dev - it varies.

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

ExpressionEngine News!

#eecms, #events, #releases