Split, and someone will reply... This post was last edited by laiyilong from 2013-03-2605: 12: 02. we all know that PHP's REQUEST_URI includes the query string, which is equal to the content in the browser address bar, however, the apache text has been split, and someone will reply to it...
This post was last edited by laiyilong at 05:12:02. we all know that PHP's REQUEST_URI includes the query string, which is equal to the content in the browser's address bar. However, we can see this description in the apache document.
REQUEST_URI
The path component of the requested URI, such as "/index.html". This notably excludes the query string which is available as its own variable named QUERY_STRING.
It should be said that the query string is independent in QUERY_STRING, and REQUEST_URI is not included in it, which makes me a bit confused, mainly when I do not know RewriteRule ^ (. *) $ the package does not include query strings, for example I have an old url old.com, someone else accesses the http://old.com/query.php? Name = abc when I want 301 override to http://new.com/query.php? Name = abc
RewriteCond %{HTTP_HOST} !^old\.com$ [NC]
RewriteRule ^(.*)$ http://new.com/$1 [R=301,L]
Does $1 mean query. php or query. php? What about name = abc? If the query string is not included, do I need to add % {QUERY_STRING} after $1 }???
------ Solution --------------------
The landlord was too early to get up so early. I just saw it when I got up. let me help you first.
------ Solution --------------------
Reference:
No one answered, so I had to test it myself. it seems that I couldn't find these basic content on the Internet, and I couldn't understand the basic content in English. the correct one is:
# REQUEST_URI does not contain QUERY_STRING;
# The anchor is processed by a local browser and will not be sent to the server;
# RewriteRule ^ (. *) $ matches {REQUEST_URI}, excluding {QUERY_STRING}. QUERY_STRING will be rewritten ......
At am, is it all night long? Life is the cost ~
Mod_rewrite won't. if you have time, study it.
------ Solution --------------------
It's time to take a break .....
------ Solution --------------------
All night? Life is the cost ~
------ Solution --------------------
The reply was deleted by the administrator at 09:10:42.