Welcome Guest, Not a member yet? Register   Sign In
htaccess, redirect from folder/index.php to folder/ ... how?
#1

[eluser]slapyo[/eluser]
I want to redirect to the root if someone accesses /controller/index.php ... if for whatever reason someone would put index.php on the end of the url. I just want it to go back to the root.

http://www.somesite.com/controller/index.php -> http://www.somesite.com

.htaccess:
Code:
RewriteEngine on

RewriteCond %{THE_REQUEST} /index\.php
RewriteRule ^(.*)$ / [R=301,L]

RewriteCond $1 !^(crossdomain\.xml|index\.php|robots\.txt|css/|images/|scripts/)
RewriteRule ^(.*)$ /index.php/$1 [L]

I get the error "No input file specified."

Ideas?


Messages In This Thread
htaccess, redirect from folder/index.php to folder/ ... how? - by El Forum - 11-19-2012, 04:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB