Hi, guys

I have checked out some redirect code on various platforms (perl, php, and js) but is doesn't seem to work like I want. I was looking for code that would redirect from a page that no longer exist to a page that does.

eg. someone got to a page from a search engine like main.html, and now the page is main.php. how do I make it so it looks at the url and redirects it to the right one.

I even looked into the htaccess file but I am not too familiar on how to do it.

so if anybody has any idea, please let me know.

TIA