主題: 关于簡捷網址的问题 作者: 小青豆 於 九月 30, 2005, 04:02:50 上午 我是管理员,我在url设定里面如果將 request_format_mode 從 "一般網址" 改成 "讓搜尋引,已经存在的用户的blog就不能访问了,找不到此页,如何修改后不影响已经存在的用户呢?谢谢
后来我又尝试修改 修改網誌根目錄的 .htaccess 檔, 加入以下一段文字 <Directory "請填入實際的絕對路徑"> AllowOverride All Options Multiviews Order allow,deny Allow from all </Directory> 结果就返回500 internal error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@jsarmy.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request 怎么办呢? 主題: Re: 关于簡捷網址的问题 作者: lss 於 九月 30, 2005, 10:49:39 上午 假設要訪問的 blog 的 blogId=1
一般網址模式訪問 blog 首頁的網址為: http://your.host/plog/index.php?blogId=1 改為簡潔網址模式時,則變為: http://your.host/plog/1 即使你改變了網址模式, pLog 還是會認得其它模式的網址,只是改變網址之後,靜態連結網址…等會改成用新網址模式顯示而已。 不知道你所謂的無法訪問已在在用戶的 blog 是那一種情形? 你可以試試從 summary.php 頁面連至其已存在用戶的 blog 試試。 主題: Re: 关于簡捷網址的问题 作者: markwu 於 九月 30, 2005, 12:47:49 下午 你的下面設定是對的嗎?
<Directory "請填入實際的絕對路徑"> AllowOverride All Options Multiviews Order allow,deny Allow from all </Directory> 假設是對的。那麼你也要記得去更改 .htaccess 中的 ErrorDocument ,把他改到你目前的安裝目錄才行。 參考:http://wiki.lifetype.org.tw/index.php/Install_pLog_through_Wizard Mark 主題: Re: 关于簡捷網址的问题 作者: 小青豆 於 九月 30, 2005, 05:54:03 下午 :-$
仍然不好用,說一下我用的是dream host的那個虛擬主機,blog放在網站的blog目錄下, 就是這樣的/home/.carisma/jsarmy/jsarmy.com/blog/ 我把url改成了有利於搜索的那種,然後修改.htaccess <Files .htaccess> deny from all </Files> <Files config.properties.php> deny from all </Files> Options -Indexes Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Permalink to the blog entry (i.e. /plog/1_userfoo/archive/3_title-foo-bar.html) RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]+)_[^.]+\.html$ index.php?op=ViewArticle&blogId=$1&articleId=$2 [L,NC] # Monthly archive (i.e. /plog/1_userfoo/archive/200401.html) RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html$ index.php?blogId=$1&Date=$2 [L,NC] # Daily archive (i.e. /plog/1_blogfoo/archive/20040101.html) RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ index.php?blogId=$1&Date=$2 [L,NC] # Album (i.e. /plog/88_userfoo/albums/34_title-foo-bar.html) RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html$ index.php?op=ViewAlbum&blogId=$1&albumId=$2 [L,NC] # Albums (i.e. /plog/88_userfoo/albums/) RewriteRule ^([0-9]+)_[^/]+/albums/$ index.php?op=ViewAlbum&blogId=$1&albumId=0 [L,NC] # Category view (i.e. /plog/88_userfoo/categories/4_cat-foobar.html) RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html$ index.php?blogId=$1&postCategoryId=$2 [L,NC] # Category-Feeds (i.e. /plog/3_userfoo/feeds/categories/2_category/atom) RewriteRule ^([0-9]+)_[^/]+/feeds/categories/([0-9]+)_[^.]+/(.*)$ rss.php?blogId=$1&categoryId=$2&profile=$3 [L,NC] # Feeds (i.e. /plog/3_userfoo/feeds/atom) RewriteRule ^([0-9]+)_[^/]+/feeds/(.*)$ rss.php?blogId=$1&profile=$2 [L,NC] # Trackbacks (i.e. /plog/3_userfoo/trackbacks/34_title-foo-bar.html) RewriteRule ^([0-9]+)_[^/]+/trackbacks/([0-9]+)_[^.]+\.html$ index.php?op=Trackbacks&blogId=$1&articleId=$2 [L,NC] # Comment form (i.e. /plog/88_userfoo/comment/34_title-foo-bar.html) RewriteRule ^([0-9]+)_[^/]+/comment/([0-9]+)_[^.]+\.html$ index.php?op=Comment&blogId=$1&articleId=$2 [L,NC] # Resources (i.e. /plog/88_userfoo/resources/this-is-a-resource-name.pdf.html) RewriteRule ^([0-9]+)_[^/]+/resources/([^.]+)\.([^.]+)\.html$ index.php?op=ViewResource&blogId=$1&resource=$2.$3 [L,NC] # Download a resource (i.e. /plog/88_userfoo/get/this-is-a-resource-name.pdf) RewriteRule ^([0-9]+)_[^/]+/get/(.+)$ resserver.php?blogId=$1&resource=$2 [L,NC] # Static Pages (i.e /plog/3_userfoo/demosites) RewriteRule ^([0-9]+)_[^/]+/(.+)$ index.php?op=Template&blogId=$1&show=$2 [NC] # A non-default blog (i.e. /plog/88_userfoo) RewriteRule ^([0-9]+)(_[^/]+)?$ index.php?blogId=$1 [L,NC] # Daily archive (i.e. /plog/1_userfoo/archive/20040101.html) RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ index.php?blogId=$1&Date=$2 [L,NC] </IfModule> <Files post> ForceType application/x-httpd-php </Files> <Files archives> ForceType application/x-httpd-php </Files> <Files static> ForceType application/x-httpd-php </Files> <Files rss> ForceType application/x-httpd-php </Files> <Files category> ForceType application/x-httpd-php </Files> <Files trackbacks> ForceType application/x-httpd-php </Files> <Files comment> ForceType application/x-httpd-php </Files> <Files resource> ForceType application/x-httpd-php </Files> <Files get> ForceType application/x-httpd-php </Files> <Files album> ForceType application/x-httpd-php </Files> <Files blog> ForceType application/x-httpd-php </Files> <Files user> ForceType application/x-httpd-php </Files> DirectoryIndex /summary.php ErrorDocument 401 /error.php ErrorDocument 403 /error.php ErrorDocument 404 /error.php 這個時候summary頁面可以訪問,但是頁面上用戶的連接全部都失效了,如果點了就成了這樣了: 找不到网页 您要查看的网页可能已被删除、名称已被更改,或者暂时不可用。 -------------------------------------------------------------------------------- 请尝试以下操作: 如果您已经在地址栏中输入该网页的地址,请确认其拼写正确。 打开 www.jsarmy.com 主页,然后查找指向您感兴趣信息的链接。 单击后退按钮,尝试其他链接。 单击搜索,寻找 Internet 上的信息。 HTTP 404 - 未找到文件 Internet Explorer 如果我加上directory那行,就是500的internal error。 這樣我嘗試了好幾种修改方法 <Directory "/"> AllowOverride All Options Multiviews Order allow,deny Allow from all </Directory> 不能用 <Directory "/home/.carisma/jsarmy/jsarmy.com/blog"> AllowOverride All Options Multiviews Order allow,deny Allow from all </Directory> 也不能用:( 去掉引號也不能用 請幫忙看看 主題: Re: 关于簡捷網址的问题 作者: 小青豆 於 九月 30, 2005, 08:49:33 下午 呵呵解決了,把地址從/改成/blog/就好用了呵呵
謝謝 主題: Re: 关于簡捷網址的问题 作者: 小青豆 於 十月 01, 2005, 12:52:38 上午 通过上面的修改后,可以从summary.php页面进入到用户的blog中了,连接也很正常,但是如果在用户的blog中打开资源中心,或者查看某一片文章,则出现错误:
Exception message: session_start(): open(/tmp/sess_fb4ffc11998ceb63cc5f32691b957655, O_RDWR) failed: Permission denied (13) Error code: 2 -- Backtrace -- /home/.carisma/jsarmy/jsarmy.com/blog/class/net/http/session/sessionmanager.class.php(41): session_start /home/.carisma/jsarmy/jsarmy.com/blog/index.php(33): sessionmanager.init /home/.carisma/jsarmy/jsarmy.com/blog/post(21): include_once Exception message: fopen(tmp/sql_error.log): failed to open stream: Permission denied Error code: 2 -- Backtrace -- /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/appender/fileappender.class.php(57): fopen /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/appender/fileappender.class.php(43): fileappender.openfp /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(142): fileappender.fileappender /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(114): loggermanager.createappenderinstance /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(87): loggermanager._loadloggerconfig /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(177): loggermanager.loggermanager /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(192): loggermanager.getinstance /home/.carisma/jsarmy/jsarmy.com/blog/class/template/template.class.php(61): loggermanager.getlogger /home/.carisma/jsarmy/jsarmy.com/blog/class/template/cachedtemplate.class.php(30): cachedtemplate.template /home/.carisma/jsarmy/jsarmy.com/blog/class/template/templateservice.class.php(173): cachedtemplate.cachedtemplate /home/.carisma/jsarmy/jsarmy.com/blog/class/view/smartyview.class.php(70): templateservice.cachedtemplate /home/.carisma/jsarmy/jsarmy.com/blog/class/view/blogview.class.php(39): viewarticleview.smartyview /home/.carisma/jsarmy/jsarmy.com/blog/class/view/viewarticleview.class.php(24): viewarticleview.blogview /home/.carisma/jsarmy/jsarmy.com/blog/class/action/viewarticleaction.class.php(164): viewarticleview.viewarticleview /home/.carisma/jsarmy/jsarmy.com/blog/class/controller/controller.class.php(309): viewarticleaction.perform /home/.carisma/jsarmy/jsarmy.com/blog/index.php(44): blogcontroller.process /home/.carisma/jsarmy/jsarmy.com/blog/post(21): include_once Exception message: Cannot open log file: tmp/sql_error.log Error code: 0 -- Backtrace -- /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/appender/fileappender.class.php(59): throw /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/appender/fileappender.class.php(43): fileappender.openfp /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(142): fileappender.fileappender /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(114): loggermanager.createappenderinstance /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(87): loggermanager._loadloggerconfig /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(177): loggermanager.loggermanager /home/.carisma/jsarmy/jsarmy.com/blog/class/logger/loggermanager.class.php(192): loggermanager.getinstance /home/.carisma/jsarmy/jsarmy.com/blog/class/template/template.class.php(61): loggermanager.getlogger /home/.carisma/jsarmy/jsarmy.com/blog/class/template/cachedtemplate.class.php(30): cachedtemplate.template /home/.carisma/jsarmy/jsarmy.com/blog/class/template/templateservice.class.php(173): cachedtemplate.cachedtemplate /home/.carisma/jsarmy/jsarmy.com/blog/class/view/smartyview.class.php(70): templateservice.cachedtemplate /home/.carisma/jsarmy/jsarmy.com/blog/class/view/blogview.class.php(39): viewarticleview.smartyview /home/.carisma/jsarmy/jsarmy.com/blog/class/view/viewarticleview.class.php(24): viewarticleview.blogview /home/.carisma/jsarmy/jsarmy.com/blog/class/action/viewarticleaction.class.php(164): viewarticleview.viewarticleview /home/.carisma/jsarmy/jsarmy.com/blog/class/controller/controller.class.php(309): viewarticleaction.perform /home/.carisma/jsarmy/jsarmy.com/blog/index.php(44): blogcontroller.process /home/.carisma/jsarmy/jsarmy.com/blog/post(21): include_once Exception message: Unknown(): open(/tmp/sess_fb4ffc11998ceb63cc5f32691b957655, O_RDWR) failed: Permission denied (13) Error code: 2 -- Backtrace -- Exception message: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) Error code: 2 -- Backtrace -- 主題: Re: 关于簡捷網址的问题 作者: 小青豆 於 十月 01, 2005, 01:23:53 上午 :-|又一个神奇的问题
如果我改成apache ModRewrite的话 就又可以使用了,没有一点错误、 但是如果使用自定义url的话,就又有问题了,从summary.php无法进入用户的blog中,返回以下错误信息 Exception message: main(/home/.carisma/jsarmy/jsarmy.com/blog/): failed to open stream: Success Error code: 2 -- Backtrace -- /home/.carisma/jsarmy/jsarmy.com/blog/blog.php(38): include_once /home/.carisma/jsarmy/jsarmy.com/blog/error.php(51): include_once Exception message: main(): Failed opening '/home/.carisma/jsarmy/jsarmy.com/blog/' for inclusion (include_path='.:/usr/local/lib/php') Error code: 2 -- Backtrace -- /home/.carisma/jsarmy/jsarmy.com/blog/blog.php(38): include_once /home/.carisma/jsarmy/jsarmy.com/blog/error.php(51): include_once 主題: Re: 关于簡捷網址的问题 作者: 小青豆 於 十月 01, 2005, 07:06:41 上午 看我新的帖子吧
主題: Re: 关于簡捷網址的问题 作者: lss 於 十月 01, 2005, 03:15:05 下午 看你的 .htaccess 內容,已經改很多地方,而且對不同的網址模式的設定也不同。
建議你先用原始的 .htaccess 覆蓋,然後參考 wiki 裡的安裝說明修改 .htaccess 檔。 或者搜尋一下 .htaccess 應該也有很多資訊。 |