Hi Leevi,
For the home page of a current project, I am using the EE Pages module with “/” set as the page URI. As a result, LG .htaccess generator produces this:
RewriteCond %{REQUEST_URI} ^/(site|includes|products||products|about|purchasing|contact-us|members|P[0-9]{2,8}) [NC]
The blank “||” causes my 404 page to appear when I try to access my system directory. If I delete one of the “|”, the log-in page shows up as usual.
Great plug in!
Excuse the simple inquiry but I can’t get it to recognize the .htaccess file. I’ve tried every combination without success. I just use a blank .htaccess page.
“Your .htaccess could not be found or is not writable. Please check the .htaccess file exists and has the correct permissions.”
Any help would be appreciated.
I have a weird issue going on when using this extension. When trying to access a PDF document in the sidebar of the site I’m working on (sidebar is an embed), I get the strange error you’ll see in the attached image. However, if I am accessing a PDF file that is in the main content area (not an embed), the PDF shows up fine. Is there any issues with this working on files contained within an embed? The files have been uploaded using a File custom field.
Edit: It looks like it isn’t an issue with this extension and instead has to do with corrupt PDF’s or something. Sorry to hijack the thread.
Is there anything special to do to get this working when EE is in a sub directory? do I set the htaccess path to the root of my server, or to the sub directory? Gregm, there seems to be an extra pipe chatacter “|” in the remove index.php rule, this gave me a 500 error too.
You should be able to set the path to the .htaccess in the extension settings.
Regarding the double pipe issue. If you site does not have pages you shoul remove the pipe. I was thinking about adding a {if pages} variable in the next version.
I’m experiencing the same issue on my end.
Great plug in! Excuse the simple inquiry but I can’t get it to recognize the .htaccess file. I’ve tried every combination without success. I just use a blank .htaccess page. “Your .htaccess could not be found or is not writable. Please check the .htaccess file exists and has the correct permissions.” Any help would be appreciated.
I’m experiencing the same issue on my end.Great plug in! Excuse the simple inquiry but I can’t get it to recognize the .htaccess file. I’ve tried every combination without success. I just use a blank .htaccess page. “Your .htaccess could not be found or is not writable. Please check the .htaccess file exists and has the correct permissions.” Any help would be appreciated.
The .htaccess path must be the server path, not a url with a trailing slash. Also it must be the directory.. don’t add .htaccess to the end.
Does that change anything?
I’m experiencing the same issue on my end.The .htaccess path must be the server path, not a url with a trailing slash. Also it must be the directory.. don’t add .htaccess to the end. Does that change anything?Great plug in! Excuse the simple inquiry but I can’t get it to recognize the .htaccess file. I’ve tried every combination without success. I just use a blank .htaccess page. “Your .htaccess could not be found or is not writable. Please check the .htaccess file exists and has the correct permissions.” Any help would be appreciated.
I’m experiencing the same issue and have checked to be sure the server path is correct. Is there any other possible explanation for the message?
My .htaccess file permission is set at 644. and I have not changed any of the .htaccess Rules in the settings.
EDIT:
Changing the permissions of the file to 666 fixed this. The strange thing is I had to try it 2-3 times before it worked. Is 666 the proper “write permissions” for the .htaccess file? I couldn’t find this info anywhere in the documentation.
Definitely a bit puzzled….
I’m NOT using the pages module, and I don’t have a masked CP.
With the default htaccess template, things were working fine, but I couldn’t access my CP with adding /index.php. [original htaccess]
I saw others not using the pages module were having the double pipe issue, so I removed the extra pipe, resulting in: [new htaccess]
All seemed fine, I could access my cp again, and wrong pages were directing me to my 404 template. All good right? But then I checked out the headers. When I removed the extra pipe, it was sending me to my 404 template, but the headers were serving up: HTTP/1.x 200 OK
Even weirder, If I add the pipe back in (reverting to the original htaccess) I get HTTP/1.x 404 Not Found, as I should.
Got me….anyone?
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
Apache error log says:
[Fri Oct 03 19:26:07 2008] [alert] [client 127.0.0.1] C:/www/livethenews/.htaccess: Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/eesystem/index.php?S=a4cf65ab84780fc34eb122f2232f622f24a28957&C=templates
Err how frustrating. Thought this plugin would work out of the box!!
Anyways I went back to .htaccess and commented the following:
# Remove IE image toolbar
<FilesMatch "\.(html|htm|php)$">
#Header set imagetoolbar "no"
</FilesMatch>
Which seems to load the page now. But im guessing this is just a temp solution! Any way to fix this?
My .htaccess file looks like:
# -- LG .htaccess Generator Start --
# .htaccess generated by LG .htaccess Generator v1.0.0
# http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/
# secure .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Dont list files in index pages
IndexIgnore *
# EE 404 page for missing pages
ErrorDocument 404 /index.php?/live_the_news/404
# Simple 404 for missing files
<FilesMatch "(\.jpe?g|gif|png|bmp)$">
ErrorDocument 404 "File Not Found"
</FilesMatch>
RewriteEngine On
RewriteBase /
# remove the www
RewriteCond %{HTTP_HOST} ^(www\.$) [NC]
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Add a trailing slash to paths without an extension
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^(.*)$ $1/ [L,R=301]
# Remove index.php
# Uses the "include method"
# http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/(site|search|live_the_news|live_the_news_embeds|gallery|members|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Remove IE image toolbar
<FilesMatch "\.(html|htm|php)$">
Header set imagetoolbar "no"
</FilesMatch>
# -- LG .htaccess Generator End --
Any help appreciated
Definitely a bit puzzled…. I’m NOT using the pages module, and I don’t have a masked CP. With the default htaccess template, things were working fine, but I couldn’t access my CP with adding /index.php. [original htaccess] I saw others not using the pages module were having the double pipe issue, so I removed the extra pipe, resulting in: [new htaccess] All seemed fine, I could access my cp again, and wrong pages were directing me to my 404 template. All good right? But then I checked out the headers. When I removed the extra pipe, it was sending me to my 404 template, but the headers were serving up: HTTP/1.x 200 OK Even weirder, If I add the pipe back in (reverting to the original htaccess) I get HTTP/1.x 404 Not Found, as I should. Got me….anyone?
Nobody’s else has noticed this? I’ve had to abandon the include method for the exclude until I figure this out.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.