请让我知道为什么我无法使用xamp在我的本地主机中使用htaccess。我在stackover中读取了所有帖子,并且httpd.config文件中的所有设置都是正确的。以下是我的htaccess文件中的代码。
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
# This will hide the folder name templetes and the php text
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+templetes/([^\s]+) [NC]
RewriteRule ^ %1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (?!^templetes/)^(.*)$ /templetes/$1 [L,NC]
# this will redirect to 404 page not found error
ErrorDocument 404 /templetes/index.php
我找到了一些东西,如果我删除了行RewriteBase /
上/
之前的templetes
和RewriteRule (?!^templetes/)^(.*)$ /templetes/$1 [L,NC]
。但在这种情况下CSS并没有显示出来。只是页面正在打开。
感谢您的公司