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 Generator eliminates needed index.html, style sheet path rules -- how to resolve?

Development and Programming

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

Hi - I’ve installed EE commercial 1.6.9 and added the (unsupported) LG .htaccess Generator v1.0.0. Everything was working fine until I added a new Template Group for the first time after installing LG .htaccess Generator.

Adding the new Template Group caused the LG .htaccess Generator to run and update the .htaccess file (as it should). However, that eliminated the below two custom additions I’d made to the .htaccess file as described in http://expressionengine.com/wiki/Remove_index.php_From_URLs/:

# During build - redirect root to static index page
RewriteCond %{REQUEST_URI} ^/$
RewriteRule $ http://www.voximate.com/index.html [R=302,L] 

# Fix queries for actions, urls and css in EE
# From http://expressionengine.com/wiki/Remove_index.php_From_URLs/
# NOTE: THIS MUST BE HERE, NOT AT END OF FILE, TO SUCCEED.
RewriteCond %{QUERY_STRING} ^(ACT=.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(URL=.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(CSS=.*)$ [NC]   
RewriteRule ^(.*)$ /index.php\?&%{QUERY_STRING} [L]

Realizing the problem, as a temporary workaround, I downloaded the updated .htaccess file and manually added the above code back in. This caused the placeholder index.html to work as it had before. But oddly, the style sheet links didn’t seem to resume working; I still had to hardcode the path to the style sheets in my EE templates as a workaround.

Here’s what I’m trying to accomplish: 1) have a temporary index.html while I’m building my blog 2) use LG .htaccess Generator to eliminate index.php/ from the URLs 3) have my actions, urls and css work (which I believe requires the “Fix queries for actions, urls and css in EE” (but I could be wrong)

How do I accomplish that?

Will sticking the two custom rules at the very top of the .htaccess file, prior to this line:

– LG .htaccess Generator Start –

… cause them both to work and not be overwritten when LG .htaccess Generator is triggered?

Sorry for the newbie question; I’m not an .htaccess or PHP hacker by trade.

Thanks for any insight,

EE Newbie

Moved to Modules by Moderator

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
15 years ago
Sue Crocker's avatar Sue Crocker

Welcome to the ExpressionEngine forums, ekrock2.

Unfortunately we don’t provide direct support for third party add-ons such as LG .htaccess generator. Moving to Modules for additional community support.

       

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.