Hi
I am having problems trying to remove index.php from the url. I have appache2.2, php 5 and mysql installed locally. I have created a folder for mysite under the htdocs folder htdocs/mysite I have installed the LG .htaccess module and create a blank file .htaccess with write access in the htdocs/mysite folder. I have enabled mod_rewrite module in apache and followed test that I have seen on other sites. I know that the mod_rewrite is working correctly so it only leaves EE and the LG .htaccess as the problem. From looking around there is nothing I need to configure except click on the generate in the plug in … as soon as I do this the site goes down and stops working. I have spent ages on this and have now decided to ask on here for help. Please can some one let me know if I need to change something in EE or the module. Any help would be appreciated. Thank you
Please help … here is an example of an ungly url that I dont want. http://localhost/mysite/index.php/technology/index/
Here is a copy of the error as soon I generate the add in Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@mysite 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.
Here is the error from the server log: [Mon May 18 22:08:03 2009] [alert] [client 127.0.0.1] C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mysite/.htaccess: Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/mysite/system/index.php?S=4395fe703712f9fe1f6261fbcd94607bcad7f843&C=admin&M=utilities&P=extension_settings&name=lg_htaccess_generator_ext
Hi
Still have ugly urls
I am a little further, I commented out LoadModule headers_module modules/mod_headers.so
I have also removed the index.php from the sites index page in general configuration.
Now when I use the generator it generates the .htaccess. This is what the generated .htaccess 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?/
# 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|main|templates|healhcare|financial|technology|energy|legal|aboutus||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 --
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.