How to use .htaccess in WAMP Server?

后端 未结 5 1674
一整个雨季
一整个雨季 2020-11-30 22:32

I searched in web for 2 days and I try to use htaccess in my local wamp but I can\'t! I know there is something wrong but I don\'t know where...

First:

相关标签:
5条回答
  • 2020-11-30 22:56

    click: WAMP icon->Apache->Apache modules->chose rewrite_module

    and do restart for all services.

    0 讨论(0)
  • 2020-11-30 22:59
    RewriteEngine on
    RewriteBase /basic_test/
    
    RewriteRule ^index.php$ test.php
    
    0 讨论(0)
  • 2020-11-30 23:08

    if it related to hosting site then ask to your hosting to enable url writing or if you want to enable it in local machine then check this youtube step by step tutorial related to enabling rewrite module in wamp apache https://youtu.be/xIspOX9FuVU?t=1m43s
    Wamp server icon -> Apache -> Apache Modules and check the rewrite module option it should be checked Note its very important that after enable rewrite module you should require to restart all services of wamp server

    0 讨论(0)
  • 2020-11-30 23:10

    Open the httpd.conf file and search for

    "rewrite"

    , then remove

    "#"

    at the starting of the line,so the line looks like.

    LoadModule rewrite_module modules/mod_rewrite.so
    

    then restart the wamp.

    0 讨论(0)
  • 2020-11-30 23:18

    Click on Wamp icon and open Apache/httpd.conf and search "#LoadModule rewrite_module modules/mod_rewrite.so". Remove # as below and save it

    LoadModule rewrite_module modules/mod_rewrite.so
    

    and restart all service.

    0 讨论(0)
提交回复
热议问题