Php mod_rewrite是否在不更改浏览器中url的情况下重定向?
现场的总体结构为:Php mod_rewrite是否在不更改浏览器中url的情况下重定向?,php,apache,.htaccess,mod-rewrite,redirect,Php,Apache,.htaccess,Mod Rewrite,Redirect,现场的总体结构为: 后端 -特拉拉拉 -特拉拉拉 -万维网 ----index.php 前端 -特拉拉拉 -特拉拉拉 -万维网 ----index.php 常见的 -特拉拉拉 .htaccess 域名egwww.mysite.com 我可以做些什么来注册.htaccess,这样当你进入www.mysite.com处理文件frontend/www/index.php,然后显示urlwww.mysite.com?例如,如果编写www.mysite.com/admin/,那么要处理文件backend
后端
-特拉拉拉
-特拉拉拉
-万维网
----index.php
前端
-特拉拉拉
-特拉拉拉
-万维网
----index.php
常见的
-特拉拉拉
.htaccess
域名egwww.mysite.com
我可以做些什么来注册.htaccess
,这样当你进入www.mysite.com
处理文件frontend/www/index.php
,然后显示urlwww.mysite.com
?例如,如果编写www.mysite.com/admin/
,那么要处理文件backend/www/index.php
在这种情况下,所有选项都可能是其他选项,例如
www.mysite.com/game/gta/
(而不是game/gta/
),在这种情况下,为了用以下参数标记文件frontend/www/index.php
(获取类型)type=game&name=gta
尝试在htaccess文件中使用以下规则:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/admin/
RewriteRule ^ /backend/www/index.php [L]
RewriteCond %{REQUEST_URI} !^/(frontend|backend|common)
RewriteRule ^ /frontend/www/index.php
谢谢,非常有帮助。