Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For some reason this rule is causing havoc in all subsequent rules (none of theme work). What does it mean exactly?

RewriteRule . /index.php [L]

share|improve this question
    
It doesn't make sense, at least to me as I'm a little rusty with rewrite rules... I do know the [L] just tells it to stop processing after running that rule. If I had to take a guess though it's almost like someone was attempting to rewrite all requests to the base directory of host to index.php... –  Mike Keller Aug 2 '11 at 21:50
    
This line on it's own make little sense (most likely you will have 500 server error if it would be only one rewrite line). There has to be one or more RewriteCond lines before this one. –  LazyOne Aug 2 '11 at 22:19
add comment

closed as not a real question by Shinrai, Wuffers, random Aug 2 '11 at 22:05

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

up vote 1 down vote accepted

That rule is apparently supposed to hide the "index.php" part of a visible url. When your working url is this http://www.somesite.com/index.php, this rule will make the browser display http://www.somesite.com/.

Well, it's probably acting the other way around. When the server receives a request http://www.somesite.com/, it'll serve up http://www.somesite.com/index.php, just without showing that last bit.

There are other ways to do this that may be more effective and less likely to cause problems such as you're experiencing. I did a google search for "mod rewrite RewriteRule . /index.php" to get this info, and most of the pages seem to have some useful suggestions regarding better ways to do this.

share|improve this answer
add comment

I believe it redirects it to root. That way when you go to www.example.com it doesn't show www.example.com/index.php. Helpful for SEO purposes.

Is this a Wordpress setup?

This is a good article over on stackoverflow that explains this.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.