How can i do multiple 302 redirects in htaccess?
How can i do multiple 302 redirects in htaccess? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the How can i do multiple 302 redirects in htaccess? error on your web browser. Problem :
Solution :
We hope that this article has helped you resolve the htaccess, redirects, 302-redirect error in your web browsers. Enjoy browsing the internet uninterrupted!
I'm currently using the following to redirect only 3-4 pages to new a site
# Use PHP5.4 as default
RewriteEngine On
RewriteRule ^news1.html$ https://www.example.com/news1.html [R,L]
RewriteRule ^news2.html$ https://www.example.com/news2.html [R,L]
RewriteRule ^news3.html$ https://www.example.com/news3.html [R,L]
Options -Indexes
However only news.1html is being redirected, not the rest of them.
How do i redirect all to their subsequent new page?
The easiest way to do this isn't with rewrite rules but with the redirect directive. Simply use
Redirect 301 /oldfile.htm http://example.net/newfile.htm
in your .htaccess file to redirect a single file from the current site to a file on another domain.
Comments
Post a Comment