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

My Response is on my own Website : Best Quality Backlink Strategy

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

Hottest Snapchat girls usernames online