Apache 在不更改URL的情况下从子域重定向到文件夹

Apache 在不更改URL的情况下从子域重定向到文件夹,apache,.htaccess,subdomain,Apache,.htaccess,Subdomain,我想让img.cetinblog.com表现得像cetinblog.com/feedimg/。我使用代码,但url正在更改。我不想更改url htaccess代码 RewriteEngine On Options Indexes FollowSymlinks Multiviews RewriteBase / RewriteCond %{HTTP_HOST} img.cetinblog.com RewriteCond %{REQUEST_URI} ^/(.+)$ RewriteRule ^(.*)

我想让img.cetinblog.com表现得像cetinblog.com/feedimg/。我使用代码,但url正在更改。我不想更改url

htaccess代码

RewriteEngine On
Options Indexes FollowSymlinks Multiviews
RewriteBase /
RewriteCond %{HTTP_HOST} img.cetinblog.com
RewriteCond %{REQUEST_URI} ^/(.+)$
RewriteRule ^(.*)$ http://cetinblog.com/feedimg/$1 [L]
问题在哪里?多谢各位

编辑: 应该重定向,但我有一些问题。

好,请尝试以下代码:

RewriteEngine On
Options +Indexes +FollowSymlinks -Multiviews
RewriteBase /
RewriteCond %{HTTP_HOST} ^img\.cetinblog\.com$
RewriteRule ^((?!feedimg/).+)$ /feedimg/$1 [L]

这两个域是否共享相同的
DocumentRoot
?他们说,我不知道我何时发送到邮件服务器,将子域指向文件夹;我们不能这样做,但您可以使用htaccess。我想应该是这样的。难道不应该反过来做吗。请求将来自OK,谢谢。所以我应该找到另一个解决方案。提供细节什么不起作用?你拿到的是404还是500?404。应该重定向。你可以查一下。显然它不是同一个文档根。是的,这就是为什么我在发布答案之前问这个问题。除非您能够控制服务器以及是否可以启用
mod_proxy
,否则这是不可能的。