I’m having a minor problem with this that I haven’t been able to see covered in earlier posts.
I’ve installed .htaccess Generator at my site is running OK without index.php. However if I go to www.mysite.co.uk/template - the url is being rewritten to www.mysite.co.uk//template - it displays fine, but kinda low.
If I go to an article page: www.mysite.co.uk/template/article - the url is absolutely fine.
All pages are totally accessible without index.php so it’s not a big problem but would be nice to get it fixed if anyone can suggest anything?
Thanks
I have been getting 500 errors too. I commented out this line:
# Dont list files in index pages
# IndexIgnore *
And it seems to be working. I’m not a .htaccess guru, so I don’t know if that’s a bad thing to comment out or what it actually means. Is there a reason that specific rule would be causing 500 errors? Hopefully things will work with it commented out…
Edit: Does it stop a listing of files if you visit a directory on the site? (Like web ftp-viewer thing?) If that’s the case then I’m not sure why that specific line would have been causing problems…
Edit #2: A friend told me “if mod_autoindex isn’t in use then it would be an undefined directive” Not sure exactly what that means either, but there ya have it. =) Or maybe it’s this thing: and mod_autoindex has to be set by my host (EngineHosting). Either way, seems like I should be in the clear.
Wondering if anyone can shed some light on an issue I can’t resolve …
I’ve installed lg.htaccess on an MSM installation with two sites. I didn’t have any issues removing index.php from site 1. But, no matter what I have tried, I can’t get index.php removed from the second site.
Is there a trick to getting this extension to work with MSM? What details can I provide?
Thanks, P
Update: Got it. Had to manually update path.php (removed index.php from $site_index = “”; )
I’ve successfully removed “index.php” from my URLs, but I can’t seem to get rid of the “?”. I’ve gone from this: www.site.com/index.php?/title to this: www.site.com/?/title.
If I turn off “Force URL query strings”, the question mark goes away, but I’m left with an extra slash in the URLs (ie www.site.com//title) and they don’t work.
Here’s my .htaccess file. Any ideas?
RewriteEngine on
# -- LG .htaccess Generator Start --
# .htaccess generated by LG .htaccess Generator v1.0.0
# http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/
# EE 404 page for missing pages
ErrorDocument 404 /index.php?/
# 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|tutorial|gallery|pregnant|blog|abortion|end_abortion|greensboro|abortion_facts|event_schedule|citing_abort73_as_a_source|2009_operating_budget|about_us|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 --
I’m also getting 500 errors I’m afraid but can’t see a double pipe. Any help appreciated!
# -- 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?/pages/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|_embeds|staging|dmwiki|sandpit|feeds|_globals|pages|schools|invalid_url|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 --
I’ve deleted my initial request for help. I’m still not sure what the problem was, but it seems to have been fixed.
After being unable to find the problem causing my .htaccess failure, I put the index.php back in place and delete the contents of the .htaccess file. After waiting a few days, I used the extension to regenerate the .htaccess content, removed the index.php, and everything works flawlessly again with no index.php. I had repeated these same steps days earlier to no effect, but perhaps I missed something the first few times.
Anyway, thanks for this extension Leevi.
Hi Leevi,
Great extension. Im still having a bit of a problem that the documentation hasn’t explained. When I make links using EE code, lets say for example a permalink, It still adds the index.php/ to the link. The site works entirely well without the index.php, its just that all my generated links still have it in it.
For example:
<a href="http://{title_permalink={my_weblog}/index}">{title}</a>{/if}
returns www.domain.net/index.php/my_weblog/ (if it helps, im on MediaTemple)
Thanks in advance!
This is a great plugin. It has worked fine for me for quite some time however recently I have begun to get a few errors. They appear above the design in the Control Panel in two different expression engine installs that I work on. When I refresh the page or go on to a different section of the cp, they no longer appear.
On one website I get this error:
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /www/enginehostingaccount/public_html/system/extensions/ext.lg_addon_updater_ext.php on line 701
And, of course, on the other website it is not happening right now as I write this post… I will follow up if it happens again, it has been fairly regular for some time now. Always seems to be around line 700… (if I remember correctly)
Are these errors anything I should be concerned about? Did I cause them in some way I can easily undo?
I am struggling in getting something to work with the LG .htaccess extension. I have a dowloads area on my site but after I install this extension it doesnt allow me to access the files in the download area. The downloads folder resides in the root of the site. Anybody has a suggestion on how to fix this? If I try to get a file from the downloads area y displays the home page.
Thanks,
Here are the errors from my other account (re: two posts above):
Notice: Use of undefined constant CURLOPT_AUTOREFERER - assumed 'CURLOPT_AUTOREFERER' in /www/location/public_html/system/extensions/ext.lg_addon_updater_ext.php on line 704
Notice: Use of undefined constant CURLOPT_AUTOREFERER - assumed 'CURLOPT_AUTOREFERER' in /www/location/public_html/system/extensions/ext.lg_addon_updater_ext.php on line 704
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /www/location/public_html/system/extensions/ext.lg_addon_updater_ext.php:704) in /www/location/public_html/system/extensions/ext.lg_htaccess_generator_ext.php on line 672
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /www/location/public_html/system/extensions/ext.lg_addon_updater_ext.php:704) in /www/location/public_html/system/extensions/ext.lg_htaccess_generator_ext.php on line 672
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.