登录 注册

登录

问题 求助:关于SEF的一个奇怪问题:链接变来变去不稳定!

更多
2009年04月03日 22:17 - 2009年04月03日 22:21 #1 作者: 火星漫步者
问题是这样:

前提:我把后台全局配置里面关于SEF的三个选项都打开了

比如说一个页面,正常情况下应该是这样的链接:
http://www.xxxxxx.com/o-bazi-theories/710-book.html

其中:o-bazi-theories是我菜单的别名,这个菜单项指向一个分类:bazi

有时候,突然发现发现所有的链接形式都变了,比如上面的链接就变成下面这样的了:

http://www.xxxxxx.com/index.php/o-fate-change-theories/tools/html/o-bazi-theories/710-book.html

这个链接有几个问题:
1。o-fate-change-theories是另外一个菜单的别名,该菜单项指向另外一个分类。
2。怎怎么多出了:index.php/o-fate-change-theories/tools/html 这个部分?
  我网站的确有一个tools目录,但是该目录下没有html目录。

上述链接出现问题之后,我只要在后台清除缓存,问题就解决了
不知道这是为什么呢?

我的.htaccess文件如下:

////////////////////////////////////////////////

##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
#Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
#RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
#RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
#RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
#RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
#RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
#RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section






专业周易起名改名: www.qimingz.com
最后修改: 2009年04月03日 22:21 由 zee.

登录 或者   注册一个会员帐号 来参与讨论

更多
2009年09月25日 13:22 #2 作者: fudesheng2008
我的站点:www.superha.com 开启开启SEF和mod_rewrite的后,同一个栏目点击有时候是这样的:http://superha.com/index.php/templates/jarutile/index.php/templates/jarutile/modules/mod_news_show_gk3/style/modules/mod_news_show_gk3/style/music.html
有时候又是这样的http://superha.com/music.html
这不是.htaccess设置问题?
我的.htaccess文件:
##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options  FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options  FollowSymLinks
Redirect /superha.html http://www.superha.com

#
#  mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|=) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|<).*script.*(>|>) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|.php|.html|.htm|.feed|.pdf|.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section



RewriteCond %{HTTP_HOST} ^superha.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.superha.com$
RewriteRule ^home$ " home.superha.com " [R=301,L]

RewriteCond %{HTTP_HOST} ^superha.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.superha.com$
RewriteRule ^bbs$ " bbs.superha.com " [R=301,L]

DirectoryIndex index.html index.htm index.php index.cgi

登录 或者   注册一个会员帐号 来参与讨论

更多
2009年09月25日 13:36 #3 作者: fudesheng2008
我的站www.superha.com也遇到这个问题,难道和缓存机制有关?

登录 或者   注册一个会员帐号 来参与讨论