![]() |
How to learn redirection url in htaccess?
Please share your knowledge related to SEO.
|
w3school is the best source to learn anything
|
Utilizing the power of the apache module mod_rewrite, however, the developers realized they could match specific patterns for entire folders and redirect them to their new URLs
|
RewriteCond %{REQUEST_URI} This identifies the URL request submitted in the browser. The regular expression identifies the unique portion of the URL request with the expression ^/querypage\.php$. The ^ (carat) indicates the start and the $ indicates the end of the portion of the URL being identified. The "" is used in front of any periods within the URL. Note that this condition is case sensitive. To make it case insensitive you would add the flag [NC] at the end of the statement.
|
By default, Redirect sort of maps the path node to a new path node, so anything after the first path gets appended to the target URL.
Try: RedirectMatch 301 ^/abc/cba/ http://www.aaa.com/? Or if you'd rather use mod_rewrite instead of mod_alias: RewriteEngine On RewriteRule ^/?abc/cba/ http://www.aaa.com/? [R=301,L] |
All times are GMT -7. The time now is 03:22 AM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.