[英]I can not redirect with .htaccess file
我試圖將用戶在domainname /之后寫的任何東西重定向到index.php文件,但是除非我寫domainname / index.php / sdsdsdsd =>,否則它是行不通的,但是我想在不鍵入index.php的情況下進行操作。
.htaccess
文件: RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php
我改變時找到了解決方案
<Directory />
AllowOverride None
Require all denied
</Directory>
至:
<Directory />
AllowOverride All
Require all denied
</Directory>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.