1. Add www tags to subdomainsRewritecond%{http_host} ^ ([A-Z.] +)? example\.com$ [NC] Rewritecond%{http_host}!^www\. [NC] Rewriterule.? Http://www.%1example.com%{request_uri} [R=301,l]
This rule crawls the%1 variable of level two domain name, if not
: This article describes how to use the detailed syntax of RewriteRule-htaccess in writing pseudo-static rules. if you are interested in PHP tutorials, refer to it. I. Regular expression tutorial
Pseudo-static rule writing RewriteRule-htaccess
RewriteCond, RewriteRule, and rewrite logs in apacheOverview
?? The main function of Rewirte is to implement URL redirection. It can be based on the server-level (httpd. conf) and directory-level (. htaccess) methods. To use the rewrite module, you
Pseudo-Static is actually the use of PHP to resolve the current address to another method to access the site, to learn pseudo-static rules of the wording, to understand a little regularFirst, regular expression tutorialThere is a classic tutorial:
About. htaccess use of pseudo-static, Zhangrong insects have not been well thought of. Used to be on the Internet to find ready-made, and then modify the next URL to implement redirection. Today, I looked for information specifically about the
The configuration process is as follows:
Apache enables the following modules:
Loadmodule proxy_module modules/mod_proxy.so
Loadmodule proxy_http_module modules/mod_proxy_http.soLoadmodule rewrite_module modules/mod_rewrite.so
Add the following
Apache URL rewrite rewriterule parameters in detailWe often do some rewriting of some URLs over Apache, so there are a lot of options for rewriting strategies, such as how to redirect, how to handle parameters, the order in which rules are
First, regular expression tutorialPseudo static rule notation rewriterule-htaccess detailed syntax use tutorial shareSimply put: pseudo-static is actually using PHP to parse the current address into another way to visit the site! To learn the
Apache's LoadModule Rewrite_module modules/mod_rewrite.so has been opened
Options FollowSymLinksAllowOverride AllOrder deny,allowDeny from all
This setting is also changed.htaccess files are as follows
order Deny,allow deny
from all
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.