Home > Backend Development > PHP Tutorial > 二级域名 伪静态问题,求路过帮忙看下!

二级域名 伪静态问题,求路过帮忙看下!

WBOY
Release: 2016-06-23 14:04:16
Original
1311 people have browsed it

1、
http://huameigu.XXX.cc/
=>>
http://www.XXX.cc/index.php/huameigu
--------------------------------------------------------
2、
http://futa.XXX.cc
=>>
http://www.XXX.cc/index.php/zyft
--------------------------------------------------------

第一个的伪静态已经成功了。但是我写的规则有点问题
这样写的

    RewriteEngine On    RewriteCond %{HTTP_HOST} huameigu.XXX.cc$ [NC]    RewriteRule ^(.*)$ index.php/huameigu/$1/ [L]
Copy after login


现在就是想把第二个也给伪静态一下,求路过大神指点一下!


回复讨论(解决方案)

原来的代码应该是Rewrite到子域名下了,大致应该是这样

    RewriteEngine On    RewriteCond %{HTTP_HOST} ^huameigu.XXX.cc$ [NC]    RewriteRule ^(.*)$ www.XXX.cc/index.php/huameigu/$1 [L]
Copy after login

哦哦,原来这样啊

原来的代码应该是Rewrite到子域名下了,大致应该是这样

PHP code?123    RewriteEngine On    RewriteCond %{HTTP_HOST} ^huameigu.XXX.cc$ [NC]    RewriteRule ^(.*)$ www.XXX.cc/index.php/huameigu/$1 [L]

这个只能让   huameigu.XXX.cc  访问是正确的啊
我现在想让   futa.XXX.cc   访问也是正常的,并且还要加更多的二级域名。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template