這應該是一個簡單的問題,但我無法弄清楚。我有一臺運行在本地網絡上的網頁。我想將在CGI下運行的腳本的結果重定向到我的/var/www/index.html/
文件。我試圖把一個重定向線在我的/ etc/apache2的/ apache2.conf``沒有工作,所以我想一個更簡單的任務:如何在Apache中重定向?
redirect permanent /var/www/index.html http://www.google.com
即使沒有這個工作。
我在做什麼錯?
我在Ubuntu機器上運行這個。
編輯:
[Sat Jun 16 17:26:36 2012] [notice] caught SIGTERM, shutting down | * Restarting web server apache2
[Sat Jun 16 17:26:36 2012] [notice] Apache/2.2.22 (Ubuntu) configured -- \|apache2: Could not reliably determine the server's fully qualified domain \
resuming normal operations
編輯:解決,新的問題
我已成功地重定向網頁谷歌
,當我重新啓動服務器這被添加到我的錯誤日誌現在我想要做實際的重定向。我已將此添加到我的apache2.conf
文件中
Redirect permanent /cgi-bin/file.cgi /index.html
並刪除了以前的文件。該文件現在被重定向到谷歌,而不是回到我的主文件...
這是怎麼回事?
你檢查了你的Apache日誌嗎?它說什麼?有沒有錯誤? – jsalonen