Super User is a question and answer site for computer enthusiasts and power users. 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

I just installed WampServer on Windows7 and uncommented mod_rewrite and set AllowOverride to All in the httpd.config file.

I created an .htacess file and placed it in the root folder with the following statement:

options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

I then created test1.php file and placed it in the same folder as the .htacess file. However, I still must provide the extension on the browser to view the file. Am I doing something wrong?

Thank you,

share|improve this question

This .htaccess file worked for me:

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

You may also want to make sure that mod_rewrite.so is enabled in Apache's httpd.conf:

LoadModule rewrite_module modules/mod_rewrite.so
share|improve this answer

Did you check if mod_rewrite is run by apache?

  • Click on the WampServer icon, select Apache, Apache modules
  • Scroll down until you see 'Rewrite_Module'
  • If there is no check mark before Rewrite_Module click on it to enable it.

Now things should work (I am not sure if you have to restart the Apache service, just try)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .