0

I'm using v2.8.1, and I'm having problems with ACT URLs. They don't seem to be working. The issue came up with DevDemon Channel Images, but I think it's related to Action IDs in general, as the logout is not working either. ACT URLs redirect to the homepage.

They work on my local site, which is a mirror of the remote and has the same .htaccess file.

I'm at a loss. I've tried adjusting the htaccess, and removing it, and clearing the cache, all with no luck. I'm hosted at hostgator, here's the htaccess file:

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # Removes index.php from ExpressionEngine URLs
        RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
        RewriteCond %{REQUEST_URI} !/systemname/.* [NC]
        RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

     AddType text/x-component .htc

Has anyone had any similar problems, or an approach for debugging? Thanks in advance for any help.

Update: When I add index.php to the ACT URL, it works... I'm assuming that I can update the HTACCESS file to get this working, but I'm not sure how.

1 Answer 1

0

Here's the .htaccess line you're looking for:

RewriteCond %{QUERY_STRING} !^(ACT=.*)$ [NC]

This is how my typical .htaccess looks like:

RewriteEngine On
RewriteBase /

# add the www
RewriteCond %{HTTP_HOST} ^alchemyviral.com
RewriteRule ^(.*)$ http://www.alchemyviral.com/$1 [R=301,L]

# Remove the trailing slash to paths without an extension
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{REQUEST_URI} /$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]


# Removes index.php from ExpressionEngine URLs
RewriteCond %{QUERY_STRING} !^(ACT=.*)$ [NC]
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
2
  • Sorry for the delay in getting back to this - this solved my problem, it's working now. Thank you!!
    – Transoptic
    Jan 8, 2015 at 17:21
  • doesn't the ^ make it so it only works when action is the first query string argument? Jul 20, 2015 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.