It looks like you're new here. If you want to get involved, click one of these buttons!
Follow below procedure to redirect any URL to another URL :-
1> Creating an .htaccess, IF already present .htaccess file than skip it.
2> Add code for Redirecting a URL in file
If currently you are using homepage.html as your index file and then later rename homepage.html to main.html, you could set up a redirect to send users from homepage.html to main.html.
Redirect /homepage.html http://www.example.com/main.html
You can also redirect for 404 error. Instead of showing a 404 page, this redirection take to the homepage of the website.
ErrorDocument 404 http://example.com/