Server Fault is a question and answer site for system and network administrators. 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

My apache httpd.conf file has following


  DocumentRoot /var/www/credit
  <Directory /var/www/credit >
    DirectoryIndex app.php
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order allow,deny
    allow from all

In my credit folder I have .htaccess file which contain the following

< IfModule mod_rewrite.c >

 RewriteEngine On
 RewriteBase /creditrepair
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ app.php [QSA,L]
 RedirectMatch ^/$ /app.php/

< /IfModule >

What I want to achieve is that ipnum/credit/app.php/home is rewritten as ipnum/credit/home

I have enabled mod_rewrite.
It doesn't work and I have no idea why.

Any suggestions?

share|improve this question

May I suggest to change a couple of lines as follows:

< IfModule mod_rewrite.c >

 RewriteEngine On
 RewriteBase /creditrepair
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)/app.php/(.*)$ $1/$2 [QSA,L]

< /IfModule >

I haven't tested but it could work, basically what it should do is rewrite the URL taking everything before ($1 match) and after ($2 match) /app.php/ appending the query string as well.

share|improve this answer
Thanks for your valuable suggestion.but it doesn't work for me.i have a doubt how could it recognize the $1 and $2.i dont whether my .htacess is connecting to server or not – bangari Jun 7 '13 at 2:53

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.