2014-11-04 58 views
0

这并不像我想象的那么简单。.htaccess 301从//example.org/subdir重定向到//subdir/example.org,因为它是

我正在试图做一个.htaccess 301重定向从//example.org/subdir到//subdir/example.org原样。我的意思是,迄今为止我尝试过的所有重定向都是//example.org/subdir-> //subdir.example.org/subdir。这真的很烦人!

我可能只是最终使用了一种更容易做的替代方法,但.htaccess似乎是最好的方法。

+1

.htaccess'重定向永久/子目录的http://子目录/ example.org',放置在服务器配置或服务器'示例的htaccess的。 org' – Cheery 2014-11-04 03:35:11

+0

你不赞美吗?干嘛不回答? :|谢谢! – Jonathan 2014-11-04 03:53:30

+1

因为可能是我没有正确理解,或者问题不完整,需要额外的细节和一些聊天需要。以防万一结果不是预期的结果等等。我在这里不是为了积分) – Cheery 2014-11-04 03:57:57

回答

0

Redirect permanent /subdir http://subdir/example.org,放置在服务器配置或服务器example.org