Mobile app version of vmapp.org
Login or Join
Mendez628

: How can i do multiple 302 redirects in htaccess? 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

@Mendez628

Posted in: #302Redirect #Htaccess #Redirects

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$ www.example.com/news1.html [R,L]
RewriteRule ^news2.html$ www.example.com/news2.html [R,L]
RewriteRule ^news3.html$ 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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Mendez628

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jessie594

The easiest way to do this isn't with rewrite rules but with the redirect directive. Simply use

Redirect 301 /oldfile.htm example.net/newfile.htm
in your .htaccess file to redirect a single file from the current site to a file on another domain.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme