Apache Version Apache/2.0.63 (Unix)
And…voila. I wonder if it was the double pipe, because I didn’t have any pages being put in there via the variable? Yep…I threw the pipe back in there without the variable, and the double pipe seems to have been the cause of my trouble. Cool, cool, cool…this is a great extension!
The only thing that doesn’t “work” now is the www removal rule. Am I misunderstanding how that works? If I type in “www.site.com” the first page I visit should go to “site.com”?
This extension is wonderful but I have a problem with the removal of the www. with your method.
This is what was originally generated by your extension in my .htaccess:
RewriteCond %{HTTP_HOST} ^(www\.$) [NC]
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I am on a MAMP server and it was not working at all, it always kept the www. in front of the url.
Then after reading the http://no-www.org/ website, I tried their way of removing the www. and this time it worked perfectly. This is what I am using now:
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Is one way better than the other? I am not really an expert with .htaccess files but this modification finally made it work.
Hi Leevi,
I just installed the multi-site manager on a site using this plugin and am getting the following error
Notice: Undefined index: 2 in /home/username/public_html/admin/extensions/ext.lg_htaccess_generator_ext.php on line 139
Notice: Undefined index: 2 in /home/username/public_html/admin/extensions/ext.lg_htaccess_generator_ext.php on line 139
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/username/public_html/admin/extensions/ext.lg_htaccess_generator_ext.php:139) in /home/username/public_html/admin/extensions/ext.lg_htaccess_generator_ext.php on line 672
Hi Leevi, I just installed the multi-site manager on a site using this plugin and am getting the following errorNotice: Undefined index: 2 in /home/username/public_html/admin/extensions/ext.lg_htaccess_generator_ext.php on line 139 Notice: Undefined index: 2 in /home/username/public_html/admin/extensions/ext.lg_htaccess_generator_ext.php on line 139 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/username/public_html/admin/extensions/ext.lg_htaccess_generator_ext.php:139) in /home/username/public_html/admin/extensions/ext.lg_htaccess_generator_ext.php on line 672
You’ll need to save the extension settings in the 2nd MSM site. I have implemented a fix in all of my extensions for this issue over the weekend. Hopefully I’ll be able to push out the updates soon.
@Greg.. could be any number of reasons. Can you create a pastie of the generated file?
Thanks for the quick answer, here is the info:
<Files .htaccess> order allow,deny deny from all </Files>
IndexIgnore *
ErrorDocument 404 /index.php?/site/404
<FilesMatch “(.jpe?g|gif|png|bmp)$”> ErrorDocument 404 “File Not Found” </FilesMatch>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www.$) [NC] RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/)$ RewriteRule ^(.*)$ $1/ [L,R=301]
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5})$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} ^/(site|search|embed_pages|box|blog|company|services|tools|publications|clients||members|P[0-9]{2,8}) [NC] RewriteRule ^(.*)$ /index.php?/$1 [L]
<FilesMatch “.(html|htm|php)$”> Header set imagetoolbar “no” </FilesMatch>
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.