.htaccess 无法使用 XAMPP 在本地主机上工作 [英] .htaccess not working on localhost with XAMPP

查看:39
本文介绍了.htaccess 无法使用 XAMPP 在本地主机上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 XAMPP,但我无法在本地主机上使用 .htaccess 文件.我尝试了很多次..在线工作良好.但本地主机显示[在此服务器上找不到请求的 URL]

i m using XAMPP but i m not able to use .htaccess file at local host. i m trying so many times.. Online working good. but local host showing [The requested URL was not found on this server]

我的根文件夹是真实的

localhost/acre/real/property_available.php
localhost/acre/real/properties


<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /acre/real/
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^properties$ /property_available.php/$1 [NC,QSA]
</IfModule>

推荐答案

刚刚遇到了类似的问题

通过检查 httpd.conf 解决它

     # AllowOverride controls what directives may be placed in .htaccess files.
     # It can be "All", "None", or any combination of the keywords:
     #   Options FileInfo AuthConfig Limit
     #
     AllowOverride All   <--- make sure this is not set to "None"

值得记住的是,我尝试过(从 Mark 的回答中)将垃圾放入 .htaccess 中",这确实给出了服务器错误 - 但即使它正在被读取,它也没有被执行,因为没有允许覆盖.

It is worth bearing in mind I tried (from Mark's answer) the "put garbage in the .htaccess" which did give a server error - but even though it was being read, it wasn't being acted on due to no overrides allowed.

这篇关于.htaccess 无法使用 XAMPP 在本地主机上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆