08-Sep-2012, 07:31 AM
Hey I am really enjoying commentics, but i'm having a problem. My project is build with codeigniter and i'm using a custom .htaccess file, mainly to get rid of index.php.
Every time I want to login to the admin panel I must delete the .htaccess file.I tried adding the code you specified before but it doesn't really work.
Could you take a look at my .htaccess which is below and instruct me on how to proceed, once again thanks!
Every time I want to login to the admin panel I must delete the .htaccess file.I tried adding the code you specified before but it doesn't really work.
Could you take a look at my .htaccess which is below and instruct me on how to proceed, once again thanks!
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Redirect index.php and default controller (you need to edit this) to "/". This is to prevent duplicated
# Content. ( /welcome/index , index.php => /)
RewriteRule ^(welcome(/index)?|index(\.php)?)/?$ / [L,R=301]
# Remove /index/ segment on the URL.
RewriteRule ^(.*)/index/? $1 [L,R=301]
# Remove Trailing Slashes.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)(/+)$ $1 [L,R=301]
# Remove Multiple slashes in betweeen
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
# Add the file SUFIX (sufix can be set on config.php).
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteCond %{REQUEST_URI} !\.html
# RewriteRule ^(.+)$ $1\.html [L,R=301]
# Remove any slash before .html ( to prevent site/.html )
# RewriteCond %{REQUEST_URI} \/+\.html$ [NC]
# RewriteRule ^(.+)\/+\.html$ $1\.html [L,R=301]
# Send everything to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>