Wordpress 的固定網址問題,困惑我一段時間了,終於在剛剛真正解決囉!
原本以為只要掛上 Apache 的 mod_rewrite 就好了,原來還要設定可以載入的目錄。

1. 啟動 Apache2 的 mod_rewirte:
sudo a2enmod rewrite ←啟動 mod_rewrite
sudo /etc/init.d/apache2 restart ←重新啟動 Apache2

參考來源:
http://blog.linym.net/archives/119

2. 設定可以載入 .htaccess 的目錄:
在 /etc/apache2/apache2.conf 的最後面新增以下的內容...

<Directory /var/www/> ←(這裡是設定讓 .htaccess 可以載入的目錄)
AllowOverride All ←(這個是關鍵的地方...)
Order allow,deny
allow from all
</Directory>
Bookmark: HemiDemi MyShare Baidu Google Bookmarks Yahoo! My Web Del.icio.us Digg technorati furl Bookmark to:YouPush Bookmark to:你推我報

Posted by tern at 痞客邦 PIXNET Comments(0) Trackback(1) Hits(464)


open trackbacks list Trackbacks (1)

  • [ubuntu]啟動 Apache2 的 mod_deflate 來壓縮網頁提高傳輸效能

    在 Ubuntu 下如何開啟 apache2 的 mod_deflate 來幫忙壓縮網頁提高傳輸效能呢? 很簡單哦!只要下一段指令就 OK... 啟動:sudo a2enmod deflate重新載入:sudo /etc/init.d/apache2 force-reload確認是否啟用:請...

Comments (0)

Post Comment

Comment Permissions: Allow commenting

Leave Comment

*Name/Nickname
E-mail
Personal Website
Comment Title
*Comment
* Private Comment