XAMPP .htaccess mod_rewrite not working

女生的网名这么多〃 提交于 2019-12-01 22:31:14
John Sonderson

As it turns out, with the default XAMPP configuration there is no need to C:\xampp\apache\conf\httpd.conf, hence no need to restart Apache as we are just making changes to C:\xampp\htdocs\www.johndoe.com\.htaccess. As this post on RewriteBase explains, we do not need RewriteBase since we will not use absolute paths in the destination links for .htaccess rules. Since relative links in these destination rules will be relative to the directory we are serving out of, we need delete the www.johndoe.com directory from the rule, as follows:

  • Place the .htaccess in ``C:\xampp\htdocs\www.johndoe.com`.
  • Place the following rewiterule in it:

    RewriteEngine on
    RewriteRule ^about/?$ index.php?value=about
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!