Joomla站点上的javascript重定向出现500错误

Joomla站点上的javascript重定向出现500错误,javascript,redirect,joomla,joomla1.5,Javascript,Redirect,Joomla,Joomla1.5,我在Joomla网站上设置了一些javascript重定向。如果有人访问woodridgelibrary.org/zinio,它会将他们重定向到。直到昨天,一切都很顺利。现在,所有重定向都会产生500个内部服务器错误。我没有在后端更改任何选项,也没有触及脚本。我检查以确保URL没有更改 奇怪的是,如果我使用iPhone和4G,重定向确实有效。他们不在无线上工作 我使用的脚本是: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitiona

我在Joomla网站上设置了一些javascript重定向。如果有人访问woodridgelibrary.org/zinio,它会将他们重定向到。直到昨天,一切都很顺利。现在,所有重定向都会产生500个内部服务器错误。我没有在后端更改任何选项,也没有触及脚本。我检查以确保URL没有更改

奇怪的是,如果我使用iPhone和4G,重定向确实有效。他们不在无线上工作

我使用的脚本是:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>

  <script language="javascript" type="text/javascript">
<!--// /
var delay = 0; // Delay in seconds
var targetURL = "http://www.woodridgelibrary.org/index.php?option=com_content&view=article&id=266&Itemid=26"; // URL to load
setTimeout('self.location.replace(targetURL)', (delay * 1));
//-->
  </script>
  <meta http-equiv="refresh" content="15;URL=http://www.woodridgelibrary.org/index.php?option=com_content&view=article&id=266&Itemid=26">
  <title>Redirect</title>


</head>

<body>

<p></p>

</body>
</html>

重新使用

你知道问题出在哪里吗

htaccess是

#RewriteEngine On
########## 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]
#


##
# @version $Id: htaccess.txt 14401 2010-01-26 14:10:00Z louis $
# @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
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
#重新启动引擎
##########开始吧,乔姆拉!核心SEF部分
#
#重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION}]
#
#如果请求的路径和文件不是/index.php,则
#尚未在内部重写为index.php脚本
#重写cond%{REQUEST_URI}^/索引\.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]
#
##
#@version$Id:htaccess.txt 14401 2010-01-26 14:10:00Z路易斯$
#@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文件的结束
重写cond%{QUERY\u STRING}mosConfig\[a-zA-Z\]{1,21}(\\%3D)[或]
#阻止任何试图通过URL发送base64_编码垃圾的脚本
重写cond%{QUERY_STRING}base64_encode.\(.*)[或]
#阻止在URL中包含标记的任何脚本
重写条件%{QUERY\u 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,L]
#
##########结束-重写规则以阻止一些常见的漏洞攻击
#如果您的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段

如果我可以提供另一种解决方案,我通常使用隐藏的菜单项创建此类重定向

  • 创建未通过模块或模板在站点中发布的新菜单
  • 在该菜单中创建一个别名为“zinio”的项目,并将其指向您的文章

  • 就是这样。没有大惊小怪,没有混乱。Joomla 2.5还有一个重定向组件,可以做你想做的事。

    创建一个未发布的新菜单


    更好的方法是使用发布在不存在位置的模块,这样您就可以使用菜单参数。

    服务器上的错误日志中有什么内容吗?错误日志中没有任何内容。您是否有
    .htaccess
    文件?您能发布它的内容吗?只是将其添加到原始帖子中。当前,您的链接抛出
    404错误,这意味着那里没有页面,这真是太棒了。这一页很好用,以后我会为其他页面做。非常感谢!我希望我们使用2.5,但不幸的是,这离我们还有很长的路要走。