Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Joomla SEO友好URL';s导致寄存器链接不工作(1.5.26)_Php_Joomla_Seo_Joomla1.5 - Fatal编程技术网

Php Joomla SEO友好URL';s导致寄存器链接不工作(1.5.26)

Php Joomla SEO友好URL';s导致寄存器链接不工作(1.5.26),php,joomla,seo,joomla1.5,Php,Joomla,Seo,Joomla1.5,启用“搜索引擎友好URL”和“使用Apache mod_rewrite”(之前我改为.htaccess)后,URL将转换为SEO友好URL,但所有链接(如“注册”、“忘记Paswword”等)都不再有效 例如,启用此选项后,register现在将其带到http://URL/component/user/register哪个不起作用 如何修复此问题,使所有内容都能使用此选项 我还附加了.htaccess文件: ## # @version $Id: htaccess.txt 21064 2011-0

启用“搜索引擎友好URL”和“使用Apache mod_rewrite”(之前我改为.htaccess)后,URL将转换为SEO友好URL,但所有链接(如“注册”、“忘记Paswword”等)都不再有效

例如,启用此选项后,register现在将其带到
http://URL/component/user/register
哪个不起作用

如何修复此问题,使所有内容都能使用此选项

我还附加了.htaccess文件:

##
# @version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 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

#
#  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!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
# 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 data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%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})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
########## End - Rewrite rules to block out some common exploits


########## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
########## End - Custom redirects


#  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
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
########## End - Joomla! core SEF Section
##
#@version$Id:htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley$
#@Joomla
#@copyright版权所有(C)2005-2010开源事宜。版权所有。
#@许可证http://www.gnu.org/copyleft/gpl.html GNU/GPL
#乔姆拉!是自由软件吗
##
#####################################################
#如果选择使用此文件,请完整阅读此文件
#
#此部分下方的行:“选项+FollowSymLinks”可能会导致问题
#使用一些服务器配置。使用mod_rewrite时需要它,但可能已经存在
#由服务器管理员以允许在中更改的方式进行设置
#您的.htaccess文件。如果使用它导致服务器出错,请将其注释掉(添加到
#行的开头),在浏览器中重新加载站点并测试sef url。如果有效的话,
#它已由服务器管理员设置,您不需要在此处设置。
#
#####################################################
##如果导致错误,可以注释掉,请参见上面的注释。
选项+FollowSymLinks
#
#mod_重写正在使用中
重新启动发动机
##########开始-重写规则以阻止一些常见的漏洞攻击
##如果您的网站出现问题,请排除下面列出的操作
##这将试图阻止对Joomla的最常见类型的利用“尝试”!
#
##拒绝访问扩展xml文件(取消注释以激活)
#
#命令允许,拒绝
#全盘否定
#满足所有
#
##拒绝访问扩展xml文件的结束
#阻止任何试图通过URL设置mosConfig值的脚本
重写cond%{QUERY\u STRING}mosConfig\[a-zA-Z\]{1,21}(\\%3D)[或]
#阻止任何试图在URL中对数据进行base64_编码的脚本
RewriteCond%{QUERY\u STRING}base64\u encode[^(]*\([^)]*\)[或]
#阻止在URL中包含标记的任何脚本
重写cond%{QUERY_STRING}(|%3E)[NC,或]
#阻止任何试图通过URL设置PHP全局变量的脚本
重写条件%{QUERY\u STRING}全局(|\[|\%[0-9A-Z]{0,2})[或]
#阻止任何试图通过URL修改_请求变量的脚本
重写条件%{QUERY\u STRING}\u请求(|\[|\%[0-9A-Z]{0,2})
#返回403禁止标题并显示根主页的内容
重写规则。*index.php[F]
#
##########结束-重写规则以阻止一些常见的漏洞攻击
##########开始-自定义重定向
#
#如果需要重定向某些页面,或将规范非www设置为
#www重定向(反之亦然),将代码放在这里
#重定向使用正确的重写规则语法和[R=301,L]标志。
#
##########结束-自定义重定向
#如果您的Web服务器的URL
#与物理文件路径没有直接关系。
#更新Joomla!目录(仅适用于根目录)
#重写基/
##########开始-Joomla!核心SEF部分
#
重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION}]
#
#如果请求的路径和文件不是/index.php,则
#尚未在内部重写为index.php脚本
重写cond%{REQUEST_URI}!^/index\.php
#请求的对象是根用户,或无扩展URL,或
#请求的URL以列出的扩展名之一结尾
RewriteCond%{REQUEST_URI}(/[^.]*|\(php | html?| feed | pdf | raw))$[NC]
#请求的路径和文件与物理文件不直接匹配
重写cond%{REQUEST_FILENAME}!-f
#请求的路径和文件与物理文件夹不直接匹配
重写cond%{REQUEST_FILENAME}!-d
#在内部将请求重写为index.php脚本
重写规则。*index.php[L]
#
##########完-Joomla!核心SEF段
**使用了下面的代码,并将其替换为现有的.htacces代码..**
#@version$Id:htaccess.txt 9975 2008-01-30 17:02:11Z ircmaxell$
#@Joomla
#@版权所有(C)2005-2008开源事宜。保留所有权利。
#@许可证http://www.gnu.org/copyleft/gpl.html GNU/GPL
#Joomla!是自由软件
##
#####################################################
#如果选择使用此文件,请完整阅读此文件
#
#此部分下方的行:“选项+FollowSymLinks”可能会导致问题
#对于某些服务器配置。使用mod_rewrite需要它,但可能已经存在
#由服务器管理员以允许在中更改的方式进行设置
#您的.htaccess文件。如果使用该文件导致服务器出错,请将其注释掉(添加到
#行的开头),在浏览器中重新加载站点并测试sef url。如果它们有效,
#它已由服务器管理员设置,您不需要在此处设置。
#
#####################################################
##如果导致错误,可以注释掉,请参见上面的注释。
#出于安全原因,无法覆盖选项followsymlinks。
#选项+FollowSymLinks
选项+符号链接所有者匹配
#
#mod_重写正在使用中
重新启动发动机
#如果您的Web服务器的URL
#与物理文件路径没有直接关系。
#更新Joomla!目录(仅适用于根目录)
重写基/
##########开始-Joomla!核心SEF部分
#
重写cond%{REQUEST_FILENAME}!-f
重写cond%{REQUEST_FILENAME}!-d
重写cond%{REQUEST_URI}!^/index.php
重写cond%{REQUEST|u URI}(/|\.php|\.html|\.htm|\.feed |\.pdf|\.raw |/[^.]*)$[NC]
重写规则(.*)index.php
重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION},L]
#
##########完-Joomla!核心SEF段
##########开始-重写规则以阻止一些常见的漏洞攻击
##如果你在y上遇到问题
    **used bellow code and replace it with existing .htacces code..** 






# @version $Id: htaccess.txt 9975 2008-01-30 17:02:11Z 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.
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch

#
#  mod_rewrite in use

RewriteEngine On


#  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


########## 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