Apache command for redirect from one page to another


Description:
Assume we have recently renamed the page foo.html to bar.html and now want to provide the old URL for backward compatibility. However, we want that users of the old URL even not recognize that the pages was renamed - that is, we don't want the address to change in their browser.
Solution:
We rewrite the old URL to the new one internally via the following rule:
RewriteEngine  on
RewriteRule    "^/foo\.html$"  "/bar.html" [PT]

I hope you get the solution, if not please comment below so that we will give you a perfect solution for you.

Comments

Popular posts from this blog

9xMovies 2021 – 300MB Bollywood, Hollywood Hindi Dubbed Movies Download

Watch INDIAN TV channels using working M3U8 links 2022

Why is Digital Marketing Important? What are the Advantages of Digital Marketing?