简体   繁体   English

.htaccess Windows问题

[英].htaccess windows issue

In the root directory of a small site i'm developing i have the following .htaccess file: 在我正在开发的小型站点的根目录中,我具有以下.htaccess文件:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-F
RewriteRule .$ index.php

that basically allows me to have pretty urls as it remaps every path that does not exists on the server (eg : /user/details/145 ) as a call to index.php where I handle it MVC-style. 基本上,我可以使用漂亮的url,因为它可以重新映射服务器上不存在的每个路径(例如:/ user / details / 145),作为对index.php的调用,在此我可以处理MVC样式。

While this works ok on MacOs, this morning I have to work on another machine that has Windows (the apache server is run by xampp ) and it does not work as it seems to redirect all the calls (eg those to static files like images) to index.php 虽然这在MacOs上可以正常运行,但是今天早上我必须在另一台装有Windows的计算机上工作(apache服务器由xampp运行),并且它似乎无法重定向所有调用(例如,将这些调用重定向到图像之类的静态文件),因此它不起作用到index.php

-f not -F -f不是-F
got this in 5 seconds from http://www.google.ru/search?q=rewritecond 在5秒钟内从http://www.google.ru/search?q=rewritecond获得了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM