RewriteRule ^itnews/([-]{})/([-]{})([-]{})/([^/_]*)_([-]+).html$ http: RewriteCond %{REQUEST_FILENAME} ^http: RewriteCond %{DOCUMENT_ROOT}% !- RewriteRule ^http: RewriteCond %{REQUEST_FILENAME} ^http: RewriteCond %{DOCUMENT_ROOT}% !- RewriteRule ^http: RewriteCond %{REQUEST_FILENAME} ^http: RewriteCond %{DOCUMENT_ROOT}% !- RewriteRule ^http:
Function to jump http://www.test.com/itnews/2013/0101/phone_12354.html to http://www.test.com/news/201301/ (33 | 11 | 12316_12354.html
Some questions:
1. flags [
2. After the flags [chain | C] Jump
RewriteCond %{REQUEST_FILENAME} !-^news/([-]{})/12_([-]+).html$ http:RewriteCond %{REQUEST_FILENAME} ^http:RewriteCond %{DOCUMENT_ROOT}% !-^http:
3.
^content-([-]+)-([-]+)-([-]+).html index.php?m=content&c=index&a=show&catid=$&id=$&page=$^content-([-]+)-([-]+)-([-]+).html http:
Because the apache configuration environment or relative path is different.
(RewriteCond %{REQUEST_FILENAME} !- non-regex pattern
RewriteCond %{QUERY_STRING} ^a=(.*^test1.php$ http:
Http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
Quick query table:
RewirteRule flag |
Description |
Description |
R |
Redirect |
Issue an HTTP redirect |
F |
Forbidden |
Prohibit Access to URL addresses |
G |
Gone |
The specified URL does not exist. |
P |
Proxy |
Pass the URL address to mod_proxy |
L |
Last |
Stop processing the following rules |
N |
Next |
Processing starts from the first rule again, but uses the URL address after the current rewriting. |
C |
Chain |
Link the current rule with the rule that follows. |
T |
Type |
MIME class specified for Force Execution |
NS |
Nosubreq |
Use this rule only when no internal sub-requests are executed |
NC |
Nocase |
URL matching is case sensitive. |
QSA |
Qsappend |
Append the query string after the new URL address, instead of replacing |
PT |
Passthrough |
Pass the rewritten URL address to another Apache module for further processing. |
S |
Skip |
Ignore rules |
E |
Env |
Set Environment Variables |