. How does htaccess solve the url issue of the website homepage. how does htaccess address the website homepage url? my website homepage has an address like this: my website domain name is tentatively set to & nbsp; A (www.a.com) and another website domain name is & nbsp; B (www. B .com) is now the first on my website. how does htaccess solve the website homepage url problem?
How does. htaccess solve the website homepage url problem?
The home page of my website has an address like this:
Tentatively set my website domain name to A (www.a.com)
Another website domain name is B (www. B .com)
At present, the home address of my website has /? From = B
How can I set. htaccess url rewriting to redirect the address to a normal state?
I wrote one myself:
RewriteRule ^ (.*)\? Www \. B \. com? $ Http://www.a.com/#1 [R = 301, L] but does not work
How should I set it?
------ Best solution --------------------
Http://www.localzend.com /? From = http://www.baidu.com
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{QUERY_STRING} ^from=(.*)
RewriteRule ^(.*)$ a.php?a=%1 [L]
However, you need to set the header in a. php to redirect.
------ Other solutions --------------------
Reference:
Http://www.localzend.com /? From = http://www.baidu.com
PHP code
RewriteCond % {REQUEST_URI} ^ (. *) $
RewriteCond % {QUERY_STRING} ^ from = (.*)
RewriteRule ^ (. *) $ a. php? A = % 1 [L]
However, you need to use a. php header to redirect ......
Yes !!! Thank you !!!