二级域名伪静态怎么弄(htaccess)

WBOY
Release: 2016-06-23 13:48:29
Original
1242 people have browsed it

两个域名都能正常访问(同IP,常规的二级域名)
domain.com       
second.domain.com
想实现的是 
second.domain.com/abc  跳转到   second.domain.com?c=abc

.htaccess是这样的,现在一切正常

.............RewriteRule ^good$ test/good.php          //domain.com/good  正常访问RewriteCond %{HTTP_HOST} ^second.domain.com$ [NC]RewriteRule ^/(.*)$       /?c=$1      //second.domain.com/abc    404
Copy after login


控制台输出 second.domain.com/abc   404未找到
原因出在什么地方?望高手回答



回复讨论(解决方案)

abc目录下重新建一个.htaccess
然后再
RewriteRule ^/(.*)$       /?c=$1

恍然大悟啊,太感谢了

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