Home > Backend Development > PHP Tutorial > 二级域名伪静态如何弄(htaccess)

二级域名伪静态如何弄(htaccess)

WBOY
Release: 2016-06-13 12:06:53
Original
1273 people have browsed it

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

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

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


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



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

Related labels:
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