[英]Rewrite .htaccess to subdirectory
如何改写网址,所以当我输入
http://mydomain.com/index.php
是相同的
http://mydomain.com/subdomain/index.php
如果您只想处理index.php
则可以执行以下操作:
RewriteEngine On
RewriteRule ^(index\.php|)$ subdomain/$1 [L]
但是,如果您想重定向每个请求subdomain folder
则可以执行以下操作:
RewriteEngine On
RewriteRule ^(?!subdomain/).*$ subdomain%{REQUEST_URI} [L,NC]
对于所有文件
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.+)$ /subdomain/$1 [NC]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.