301重定向不工作,是我想要的可能吗?重定向、工作、我想要

由网友(你的眉眼.)分享简介:下面是我的.htaccess文件Here is my .htaccess file# BEGIN WordPressRewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond...

下面是我的.htaccess文件

Here is my .htaccess file

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L]
</IfModule>
# END WordPress 

Redirect 301 http://whattodoindublin.com/ http://www.whattododirectory.com/category/dublin/

http://whattodoindublin.com/ 是指向同一个文件夹中的 http://www.whattododirectory.com/ 所以它加载同样的内容,但我想要的 http://whattodoindublin.com/ 加载子目录上面,这可能吗?

http://whattodoindublin.com/ is pointing to the same folder as http://www.whattododirectory.com/ so it loads of the same content but I want http://whattodoindublin.com/ to load the subdirectory as above , is this possible?

推荐答案

从的重定向指令

语法:重定向[状态] URL路径URL   ...   旧的URL路径是区分大小写的(%-de codeD)路径的用斜线开始。相对路径是不允许的。

Syntax: Redirect [status] URL-path URL ... The old URL-path is a case-sensitive (%-decoded) path beginning with a slash. A relative path is not allowed.

您只能重定向的路径的一个外部URL。也许在你的虚拟主机部分还是在的.htaccess的whattodoindublin.com,你可以做

You can only redirect a path to an external URL. Maybe in your virtual host section or in the .htaccess for whattodoindublin.com, you can do

Redirect 301 / http://www.whattododirectory.com/category/dublin/
阅读全文

相关推荐

最新文章