I have installed WAMP on Windows. I found .htaccess files are not working here. Is there any way to work with .htaccess?
Asked
Active
Viewed 2.6k times
15
-
How do you know if it's not working? Or you meant rewriting not working? Or? What exactly is not working? – Andreas Wong Dec 01 '10 at 07:05
-
when i try to put .htaccess file (to use mode rewrite) ,it showing page not found error – Deepak Dec 01 '10 at 07:07
-
could you post the content of .htaccess and how you are accessing your page? – Andreas Wong Dec 01 '10 at 07:10
-
RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 – Deepak Dec 01 '10 at 07:42
-
I come to know it need to modify "AccessFileName .htaccess" to "AccessFileName htaccess.txt" and changed this file name on server.But still not get any result. – Deepak Dec 04 '10 at 07:01
3 Answers
24
Click on Wamp icon and open Apache/httpd.conf and search "rewrite_module". Remove # as below and save it
LoadModule rewrite_module modules/mod_rewrite.so
after that restart all service.

Sanjeev Chauhan
- 3,977
- 3
- 24
- 30
20
1) Left click WAMP icon
2) Apache
3) Apache Modules
4) Left click rewrite_module

Andy
- 966
- 11
- 16
-
Makes me feel silly to have looked this up (seems so obvious now). Thanks anyway! – GHandel Jan 15 '16 at 17:44
-
hey I also followed @andy steps. But by default rewrite_module is working. (green right mark is there before file name). In my case I want to remove .php extensions from files when it appear in url box. I'm using following code `RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php [NC,L]` I think my .httaccess is not working... Because still showing .php extension end of the url. – sashiksu Jul 19 '18 at 17:11
-
This CAN be a bugger to get working, there are many many many many problems ahead of you :] Keep digigng. – Andy Mar 14 '19 at 02:59
1
Open Apache/conf/httpd.conf and search "rewrite_module".
Remove # as below
#LoadModule rewrite_module modules/mod_rewrite.so
as
LoadModule rewrite_module modules/mod_rewrite.so
Then Save it and restart your server. It will work.

Tamilselvan S
- 23
- 1
- 8
-
Thanks Tamilselvan, In my wampp2.2 this feature is disabled. According your help my problem is solved after 2 hour. Really thanks. – Bhavin Thummar Jul 24 '18 at 13:40