2

在网站的一般结构是:

backend
- tralala
- tralala
- www
---- index.php
frontend
- tralala
- tralala
- www
---- index.php
common
- tralala
.htaccess

域例如www.mysite.com

我可以做些什么来注册.htaccess,以便当您转到已www.mysite.com处理的文件frontend/www/index.php然后显示 url时www.mysite.com?如果例如写www.mysite.com/admin/然后处理文件backend/www/index.php

在这种情况下,所有可能都是其他选项,例如www.mysite.com/game/gta/(而不是game/gta/可以是任何东西),并且在这种情况下,为了frontend/www/index.php使用以下参数(GET-type)标记文件type=game&name=gta

4

1 回答 1

0

尝试在您的 htaccess 文件中使用这些规则:

RewriteEngine On

RewriteCond %{REQUEST_URI} ^/admin/
RewriteRule ^ /backend/www/index.php [L]

RewriteCond %{REQUEST_URI} !^/(frontend|backend|common)
RewriteRule ^ /frontend/www/index.php
于 2013-11-13T15:22:57.910 回答