I have a pretty straight forward question about 301 redirect.
So I’ve written 301 redirect for one folder on my site to another site:
RewriteRule ^example/folder https://example-new-site.com/ [L,R=301]
Now I’m wondering if other sites(which are not mine) that have links to that folder/pages will also be redirected or no?
Advertisement
Answer
The directives in .htaccess
apply to all incoming HTTP requests.
When a user (or bot) follows a hyperlink on a website, this instructs the user’s browser (user-agent) to make a request to the destination URL. In the case of an HTTP URL to your website then the user’s browser makes an HTTP request – in a similar way to if the user had typed that URL into their browser.
So, yes, a user following a link on another site is also redirected as it’s simply an HTTP request.
To be honest, if the external link (or rather, the user/bot following that external link) did bypass your redirect, then what’s the point of implementing the redirect in the first place? Oridinarily, redirects of this nature are in place solely to redirect inbound requests for old URLs.