Forum Moderators: Robert Charlton & goodroi
# Redirect index.php to / except /excludethisfolder/
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.php\ HTTP/
RewriteCond %{REQUEST_URI} !^/excludethisfolder/index\.php$
RewriteRule index\.php$ http://www.example.com/%1 [R=301,L] [edited by: tedster at 5:03 pm (utc) on Feb 21, 2011]
I am using this piece of htaccess code to rewrite / to /index.php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^$ http://example.com/index.php [R=301,L]
</IfModule>
I am using this piece of htaccess code to rewrite / to /index.php