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.

ACT Urls with a renamed "Index.php" file

January 15, 2013 9:49am

Subscribe [1]
  • #1 / Jan 15, 2013 9:49am

    cozmir

    30 posts

    I have an Expression Engine site that must coexist in the same directory as an older section of the site with traditional .php pages. Initially this worked great because I simply renamed the EE “index.php” to be “ee-index.php” and set up a matching .htaccess file to strip this out of the URL.

    However, this week I needed to do some development that utilized ACT urls. They don’t work with my current configuration at all.

    Can anyone shed some light on how to get my .htaccess working in this scenario? Currently I’m looking like this…

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{THE_REQUEST} ^GET
    RewriteCond %{THE_REQUEST} ^[^/]*/ee-index\.php [NC]
    RewriteRule ^ee-index\.php(.+) $1 [R=301,L]
    RewriteCond %{THE_REQUEST} ^GET
    RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /ee-index.php/$1 [L]
    </IfModule>

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

ExpressionEngine News!

#eecms, #events, #releases