0
我爲我的應用程序使用ZF1,下面是我的.htaccess文件,它位於/ public文件夾中。如何爲cronjob應用.htaccess規則?
.htaccess
----------------------------
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Folder Structure
------------------------------------
/application
/public
index.php
/scripts
cronjob.php
目前,有什麼發生的所有請求重定向到的index.php文件。我想/cronjob.php請求重定向到/scripts/cronjob.php文件。我該如何處理.htaccess?
感謝,Jimit
如果cronjob運行在同一臺服務器上,則不需要任何規則,因爲它不使用瀏覽器訪問腳本,而是訪問本地路徑。 – Prix