0
下面是我的.htaccess
代碼:阿帕奇重寫規則無法正常運行
<VirtualHost *:80>
ServerName api.xxxx.com
DocumentRoot /dianxiaoer/html/two-twenty
<Directory /dianxiaoer/html/two-twenty>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
RewriteRule /notify/alipay /mobile/index.php?act=notify&op=alipay
#Options Indexes FollowSymLinks MultiViews
Options FollowSymLinks
AllowOverride None
Require all granted
Order allow,deny
allow from all
</Directory>
</VirtualHost>
URL重寫規則
api.xxxx.com/notify/alipay to api.xxxx.com/mobile/index.php?act=notify&op=alipay
無法正常工作。任何人都可以請解釋我在這裏做錯了什麼?謝謝。
你有什麼錯誤? – CUGreen
代碼的第九行不起作用,無法重定向 – uzaiHu
可能是因爲第8行的規則覆蓋了它 – CUGreen