问个.htaccess通用写法如何写

WBOY
Release: 2016-06-13 11:29:00
Original
759 people have browsed it

问个.htaccess通用写法怎么写

RewriteCond %{HTTP_HOST} ^xxx.rtkuhn.com$ [NC]<br />RewriteCond %{REQUEST_URI} !^/xxx/<br />RewriteRule ^(.*)$ /xxx/$1<br />RewriteCond %{HTTP_HOST} ^xxx.rtkuhn.com$<br />RewriteRule ^(/)?$ /xxx/index.htm [L]<br />
Copy after login

这段代码可以自动重写名字为xxx的子目录文件夹为二级域名,我想问下现在我有上百个这样的子目录,一个一个添加的话会很麻烦,通用的规则该怎么写呢?谢谢!

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