HTCaccess rediect重复子文件夹

时间:2017-04-07 12:43:49

标签: html

我正在尝试将主页重定向到博客。我正在使用像这样的htcaccess代码

Redirect / http://coolefitness.com/blog

结果为http://coolefitness.com/blogblogbloglblogblog

不知道为什么要重复博客。我没有告诉它这样做。我甚至不知道如何让这个循环发生。

这是我的完整htcaccess

DirectoryIndex index.php
Redirect /index.html http://coolefitness.com/index.php
Redirect /members.html http://coolefitness.com/members.php
Redirect /what-is-coolefitness.html http://coolefitness.com/what-is-coolefitness.php
Redirect /instructors.html http://coolefitness.com/instructors.php



RewriteEngine On

#Unless directory, remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^([^/]+)/$ http://example.com/folder/$1 [R=301,L]
RewriteRule ^([^/]+)/$ http:/coolefitness.com/blog/$1 [R=301,L]

Redirect / http://coolefitness.com/blog

ErrorDocument 403 /404.php
ErrorDocument 404 /404.php
ErrorDocument 500 /404.php

FallbackResource payment/app.php



# Resolve .php file for extensionless php urls
RewriteRule ^([^/.]+)$ $1.php [L]

我尝试过重写,但这不起作用。我删除了它,问题仍然存在。

0 个答案:

没有答案