[英]Apache mod_rewrite in loop
我有兩種網址:
1是index.php的命令,2是實際文件
我需要將mod_rewrite請求1發送到/MyApp/index.php我需要將mod_rewrite請求2發送到/MyApp/shared/css/somestyle.css
in /
我在RewriteEngine On
得到了.htaccess
文件
RewriteCond ^MyApp/%{REQUEST_FILENAME} -f
RewriteRule ^MyApp/([^/]*)/(.*)?$ /MyApp/$1/$2 [L,QSA]
RewriteCond ^MyApp/%{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)/?$ /MyApp/index.php [L,QSA]
mod_rewrite似乎處於循環狀態。
我敢肯定,答案很簡單,但是我過了一天。 。 。 我仍然看不到我在做什么錯。
嘗試這個:
RewriteEngine On
RewriteRule ^/Admin/Cpanel$ /MyApp/index.php [L]
RewriteRule ^/Admin/(.*)$ /MyApp/$1
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.