.htaccess .htc使用掩码访问目录
我正在尝试创建一个.htaccess重定向,从根目录重定向到名为/newdrupal7site的目录 以下是我得到的:.htaccess .htc使用掩码访问目录,.htaccess,redirect,drupal-7,.htaccess,Redirect,Drupal 7,我正在尝试创建一个.htaccess重定向,从根目录重定向到名为/newdrupal7site的目录 以下是我得到的: RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?mywebsite.com$ RewriteRule ^(/)?$ newdrupal7site [L] 这是可行的,但是/newdrupal7站点显示在URL中,我似乎无法删除它。我也不想让它在你访问网站的页面时显示出来。让它旋转一下: RewriteEngine On #
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?mywebsite.com$
RewriteRule ^(/)?$ newdrupal7site [L]
这是可行的,但是/newdrupal7站点显示在URL中,我似乎无法删除它。我也不想让它在你访问网站的页面时显示出来。让它旋转一下:
RewriteEngine On
# push requests for site to new dir
ProxyRequests Off
ProxyPass / http://yoursite/newdrupal7site/
ProxyPassReverse / http://yoursite/newdrupal7site/
<Proxy />
Order deny,allow
Allow from all
</Proxy>
# redirect base requests
RewriteRule ^/newdrupal7site/(.*)$ /$1 [R=301,NC,L]
重新编写引擎打开
#将站点请求推送到新目录
代理请求关闭
ProxyPass/http://yoursite/newdrupal7site/
ProxyPassReverse/http://yoursite/newdrupal7site/
命令拒绝,允许
通融
#重定向基本请求
重写规则^/newdrupal7site/(.*)$/$1[R=301,NC,L]
试一试:
RewriteEngine On
# push requests for site to new dir
ProxyRequests Off
ProxyPass / http://yoursite/newdrupal7site/
ProxyPassReverse / http://yoursite/newdrupal7site/
<Proxy />
Order deny,allow
Allow from all
</Proxy>
# redirect base requests
RewriteRule ^/newdrupal7site/(.*)$ /$1 [R=301,NC,L]
重新编写引擎打开
#将站点请求推送到新目录
代理请求关闭
ProxyPass/http://yoursite/newdrupal7site/
ProxyPassReverse/http://yoursite/newdrupal7site/
命令拒绝,允许
通融
#重定向基本请求
重写规则^/newdrupal7site/(.*)$/$1[R=301,NC,L]