Too many friends will encounter a problem, that is htaccess file conflict problem, for example, a site, the whole station is pseudo static, and is used by the virtual host, Then you have to use the. htaccess file rules to achieve, while using the CMS file portal with DZ do BBS, with WP do blog, I only know WP and DZ program static will exist conflict, may lead dz static file invalidation. In this way, the scope of the htaccess file is used.
Here is a basic and most standard htaccess file:
Copy Code code as follows:
# BEGIN
<ifmodule mod_rewrite.c>
Rewritebase/products
Rewriteengine on
Rewriterule ^index-page ([0-9]*) (/) $ index.php?page=$1
Rewriterule ^ ([0-9]+) (/) $ products.php?id=$1
</IfModule>
# End
The Rewritebase property of this file is the scope, not just the. htaccess file placement location, this attribute is an absolute path, and of course the. htaccess's stored path, and all of the following rules will take effect relative to this path.
In this way, WP and DZ conflict can be resolved, WP htaccess files can be placed under the blog, and then the BBS directory decentralized htaccess DZ. Of course, if all is placed in the root directory, may also conflict, but, how many people put the same program in a directory? Not only is not easy to manage, to the later program upgrades also bring a lot of trouble.