1

I have EE Core installed in a subdirectory of my site, but it is set up as an add-on domain.

I followed the official instructions to remove index.php and the urls work if I type them manually (without index.php), but all the links generated from the CP break:

View Site link displays like this: http://domain.me/?URL=http://domain.me/

View Template displays: http://domain.me/?URL=http://domain.me/services and doesn't rewrite.

However, if I type in domain.me/services, the rewrite works. I can see that it's stripping the "services" segment, but I don't know why.

This is the only thing in my .htaccess:

# Removes index.php from ExpressionEngine URLs

RewriteEngine On

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

Any help would be greatly appreciated!

1 Answer 1

0

Try adding these lines at the end of your .htaccess

RewriteCond %{QUERY_STRING} ^(ACT=.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(URL=.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(CSS=.*)$ [NC]   
RewriteRule ^(.*)$ /index.php\?&%{QUERY_STRING} [L] 
2
  • That worked beautifully! Could you explain exactly what those additional rules are doing? Thank you so much. Commented Sep 2, 2013 at 0:00
  • In short, adding question mark after index.php to process these special URL requests. If the answer has helped you, please mark it as correct. Commented Sep 3, 2013 at 8:21

Your Answer

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

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