Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Ok, so I have this .htaccess file that contains this

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php?p=%{REQUEST_URI}&%{QUERY_STRING} [L]

Problem is, that in apache 2.2.22, the p and the other query objects don't come through, but it works great in apache 2.4.2 .

So basically in apache 2.2.22 it just forwards everything to index.php, but it doesn't have any get objects.

Any help, thanks.


Ok so I changed the line

RewriteRule . /index.php?p=%{REQUEST_URI}&%{QUERY_STRING} [L]


RewriteRule ^(.*) /index.php?p=$1 [L,QSA] And now on apache 2.2.22 the p GET doesn't go through, but any specific queries I add go through.

So If I do


on 2.4.2 I get

array (size=2)
  'p' => string 'index/fun/buns/funds' (length=20)
  'man' => string 'woman' (length=5)

and on 2.2.22 I get

array(1) {
  string(5) "woman"

To be clear What's happening on 2.4.2 is what I want, and 2.2.22 isn't cooperating.

Another Update Ok so it seems like what is happening is that when I do /index/whatever, it auto assumes index.php, and ignores that, it auto adds the .php to it, when I don't want it to. Any ideas on how to stop that?

share|improve this question
up vote 3 down vote accepted

Needed to put add -MultiViews to the httpd.conf file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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