網址設定(自訂網址)
lifetype 自訂網址的設定,好像有點不太好了解,也有點懶得去了解,在網上找到,比照辦理就ok
http://ms7.fhsh.tp.edu.tw/blog/index.php?blogId=1 ==> http://ms7.fhsh.tp.edu.tw/blog/root
直接打網誌管理者名稱,是不是容易記多了,修改如下
- 在 /etc/httpd/conf/httpd.conf 下將 /var/www/html/blog 內的 AllowOverride All ,這樣目錄下的 .htaccess 才有作用
- 將 .htacess 內的
RewriteBase /lifetype
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /lifetype/blog.php
ErrorDocument 401 /lifetype/error.php
ErrorDocument 403 /lifetype/error.php
ErrorDocument 404 /lifetype/error.php - 在全站台管控 => 網址設定 如下
request_format_mode => 自訂網址
permalink_format => /{blogowner}/archives/{postid}$
category_link_format => /{blogowner}/category/{catid}$
blog_link_format => /{blogowner}$
archive_link_format => /{blogowner}/archive/{year}{month}{day}$
user_posts_link_format => /{blogowner}/archives/author/{username}$
post_trackbacks_link_format => /{blogowner}/archives/{postid}/trackbacks/$
template_link_format => /{blogowner}/static/{templatename}$
album_link_format => /{blogowner}/resource/{albumid}$
resource_link_format => /{blogowner}/resource/{albumid}/{resourceid}$
page_suffix_format => /page/{page} - ok