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.

removing index.php and AJAX ACT

December 08, 2010 2:26pm

Subscribe [2]
  • #1 / Dec 08, 2010 2:26pm

    Bruce Brown

    74 posts

    Hello, I’m finishing upgrading a site to EE 2.1.

    I’m using the “exclude list” method of index.php removal.

    I’ve purchased the Devdemon Channel Images module and am having trouble getting it to work.  Brad says that it may be due to my AJAX ACT url being wrong due to my method of removing index.php.

    He says that my link http://domain.com/?ACT=73 should be http://domaint.com/index.php?ACT=73.

    My htaccess is: 

    RewriteEngine on
    RewriteCond $1 !^(awsats|bnsys|cgi-bin|cp|css|flash_video|images|mint|modlogan|themes|webalizer|crossdomain\.xml|admin\.php|index\.php|offline\.html|path\.php|robots\.txt|sitemap\.php) [NC]
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteRule ^/index.php/sitemap.php$ sitemap.php
    AddType application/x-httpd-php .html .htm
    <IfModule mod_php.c>
    php_value auto_prepend_file /hsphere/local/home/couragenet/couragenet.com/mint/config/auto.php
    </IfModule>

    Any ideas on how I can get the index.php? added back to the ACT=73 url?

    Bruce

  • #2 / Dec 08, 2010 4:04pm

    narration

    773 posts

    Bruce, yes, you have to specially handle actually three coded URL types, including the ACTs, to keep all EE application and control panel functionality working.

    Inserting something like the following at the beginning, just after the RewriteEngine On line and before the rest of your conditions and actions should do the trick.

    RewriteCond %{QUERY_STRING} ^(ACT=.*)$ [NC,OR]
    RewriteCond %{QUERY_STRING} ^(URL=.*)$ [NC,OR]
    RewriteCond %{QUERY_STRING} ^(CSS=.*)$ [NC]
    RewriteRule ^(.*)$ /index.php\?&%{QUERY_STRING} [L]

    You may or may not need the \? in the last line, depending on your hosting and site settings.

    This information is actually in the Wiki, in the article at http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method.

    However, the article is in ‘some’ need of a clarifying edit….

    Regards,
    Clive

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

ExpressionEngine News!

#eecms, #events, #releases