出于某种原因,我突然无法让我的 Redirect 301 正常工作。.htaccess 文件如下。我只粘贴了第 10 个重定向 301 命令,但有超过 100 个。
301 重定向都具有相同的格式,但列出的前六个无效。最后四个(后跟“ ** ”)按预期运行。我看不出任何解释。
有任何想法吗?
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 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
RewriteCond %{HTTP_HOST} ^www\.caringcompanion\.net [NC]
RewriteRule (.*) http://caringcompanion.net/$1 [R=301,L,NC]
Redirect 301 /homecare/10-caring-companion/index.php?option=com_content&view=article&id=89&Itemid=75 http://www.caringcompanion.net/concord-ma
Redirect 301 /homecare/10-caring-companion/index.php?option=com_content&view=article&id=94&Itemid=75 http://caringcompanion.net/cambridge-ma
Redirect 301 /homecare/10-caring-companion/index.php?option=com_content&view=article&id=94&Itemid=74 http://caringcompanion.net/cambridge-ma
Redirect 301 /index.php?option=com_content&view=article&id=94:cambridge-ma-home-care-elderly-caregivers&catid=38:cambridge&Itemid=74 http://caringcompanion.net/cambridge-ma
Redirect 301 /index.php?option=com_content&view=article&id=93:acton-ma-home-care-elderly-caregivers&catid=34:acton&Itemid=70 http://caringcompanion.net/acton-ma
Redirect 301 /homecare/10-caring-companion/index.php?option=com_content&view=article&id=93&Itemid=70 http://caringcompanion.net/acton-ma
Redirect 301 /homecare-ma/ma/index.php?option=com_content&view=article&id=52&Itemid=158 http://caringcompanion.net/homecare-massachuetts-maine-new-hampshire
Redirect 301 /tag/71-biophilia http://caringcompanion.net/services/client-care-coordinators ***********
Redirect 301 /ccc-copyright-notice/73-caring-companion/services/127-alzheimers-dementia-services http://caringcompanion.net/services/alzheimers-dementia *********
Redirect 301 /index.php/component/content/article/73-caring-companion/services/127-alzheimers-dementia-services http://caringcompanion.net/services/alzheimers-dementia ******
Redirect 301 /jblog/118-alzheimers-dementia http://caringcompanion.net/services/alzheimers-dementia ***********************