0
我想使用htaccess檢查URL。開發者可能想要運行特殊文件 - specialfile.php。我使用htaccess的:使用htaccess檢查URL並停止處理
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /specialfile\.php$
RewriteRule .* [L] #don't change adress
RewriteRule ^$ public/index.html [NC,L]
RewriteRule (.*) public/$1 [NC,L]
我的想法是:如果的RewriteCond%{REQUEST_URI}比的htaccess應該使用重寫規則/specialfile.php$真實* [L] - 這應該意味着specialfile.php將運行並這一切。但它不起作用,因爲它運行下一條規則:重寫規則(。*)public/$ 1 [NC,L]。
這對我很有幫助。謝謝 –