Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.

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
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, this rule will make the browser display

Well, it's probably acting the other way around. When the server receives a request, it'll serve up, 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

I believe it redirects it to root. That way when you go to it doesn't show Helpful for SEO purposes.

Is this a Wordpress setup?

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

share|improve this answer

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