We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG .htaccess and ExpressionEngine Logout URL

Development and Programming

Stephen Lewis's avatar
Stephen Lewis
466 posts
16 years ago
Stephen Lewis's avatar Stephen Lewis

Hello all,

This is as much for future me as anything else – the next time I encounter this problem, I’ll invariably search the forums, and hopefully find my own past wisdom.

I ran into a problem this morning with LG .htaccess and EE’s standard logout URL: /?ACT=10. The issue was solved by adding the following condition to the top of the “Remove index.php” block of rules.

RewriteCond %{QUERY_STRING} !(ACT=[0-9]{1,3})

The entire “Remove index.php” block in the extension’s settings now looks like this:

# Remove index.php
# Uses the "include method"
# http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
RewriteCond %{QUERY_STRING} !(ACT=[0-9]{1,3})
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/({ee:template_groups}|{ee:pages}|members|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]

I look forward to revisiting this post regularly in the coming months and years.

Stephen

       
Nate Iler's avatar
Nate Iler
29 posts
16 years ago
Nate Iler's avatar Nate Iler

I also noticed an issue when I was using EE’s standard logout path and LG .htaccess generator. In my case, I’m not using the ‘Pages’ module so by simply removing the pages call from the LG’s generator it resolved my issue.

ORIGINAL:

RewriteCond %{REQUEST_URI} ^/({ee:template_groups}|{ee:pages}|members|P[0-9]{2,8}) [NC]

CHANGED TO:

RewriteCond %{REQUEST_URI} ^/({ee:template_groups}|members|P[0-9]{2,8}) [NC]
       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

I know nothing about rewrite rules, but just ran into a similar issue. LG .htaccess breaks anything that uses $_GET vars at all. Any idea how to fix that?

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

I figured it out. The very last line here:

RewriteRule ^(.*)$ /index.php?/$1 [L]

I just removed the ? and now get vars work anywhere.

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill
Hello all, This is as much for future me as anything else – the next time I encounter this problem, I’ll invariably search the forums, and hopefully find my own past wisdom. I ran into a problem this morning with LG .htaccess and EE’s standard logout URL: /?ACT=10. The issue was solved by adding the following condition to the top of the “Remove index.php” block of rules.
RewriteCond %{QUERY_STRING} !(ACT=[0-9]{1,3})
The entire “Remove index.php” block in the extension’s settings now looks like this:
# Remove index.php
# Uses the "include method"
# http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
RewriteCond %{QUERY_STRING} !(ACT=[0-9]{1,3})
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/({ee:template_groups}|{ee:pages}|members|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
I look forward to revisiting this post regularly in the coming months and years. Stephen

Thanks Stephen. I was using the Link List module and removing the index.php broke the links. This fixed it.

       
Stephen Lewis's avatar
Stephen Lewis
466 posts
16 years ago
Stephen Lewis's avatar Stephen Lewis
Thanks Stephen. I was using the Link List module and removing the index.php broke the links. This fixed it.

Glad it helped Kyle.

Cheers, Stephen

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham

Good call Stephen, I’ll add that rule to the next release. I’ll probably remove a bunch of the other rules that come by default and let people figure them out on their own systems.

       
BridgingUnit's avatar
BridgingUnit
214 posts
16 years ago
BridgingUnit's avatar BridgingUnit

I’ve just used the following line as an alternative to Stephen’s. I guess they do pretty much the same thing, but would like someone who knows more than me to confirm in case one is better than the other in some respect:

RewriteCond %{QUERY_STRING} !^(ACT=.*)$ [NC]
       
Luke Hardiman's avatar
Luke Hardiman
109 posts
about 16 years ago
Luke Hardiman's avatar Luke Hardiman

This is a very helpful thread, I’ve given up on $_GET vars in the past not thinking this might be the cause. Thanks Brian and Stephen.

This simple fix is going to help me with both an ajax shopping cart and logout issues.

       
pottercreative's avatar
pottercreative
17 posts
15 years ago
pottercreative's avatar pottercreative

Stephen you rock! This fixed all my issues - sheesh. The time wasted!!!! Arg!

       
Stephen Lewis's avatar
Stephen Lewis
466 posts
15 years ago
Stephen Lewis's avatar Stephen Lewis

Glad it helped, pottercreative.

Cheers, Stephen

       
stubear's avatar
stubear
114 posts
15 years ago
stubear's avatar stubear

Thanks for the fix Stephen. I’m working on my first EE site using the member module and this bug has been rather annoying to say the least.

Leevi, any word on an update to LG .htaccess Generator? Perhaps you could provide a relatively extensive .htaccess file commenting out all but the most necessary rules and comments to help users, such as myself, to learn more about writing .htaccess files through example. More experienced users who want a quick and easy to manage solution will likely rip out this stuff when they install the plug-in but don’t under estimate its value.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.