First of all you can create an .htaccess file on your web server. you can create file using FTP and SSH. Here you can use FTP because it is easy as compare to command line. These are the other FTP clients you can use for htaccess redirect URL to another URL:
Here you can use file zilla for htaccess redirect URL to another URL. Using file zilla you can see that how to create or delete a file and edit it. you should download file zilla. Here is the link of file zilla. (https://filezilla-project.org/download.php?platform=win64).using this link you can download file zilla.
5. you can see a prompt here you enter the file name .htaccess. Click on ok and save it.
6.you can see that an .htaccess file which is empty.
How to edit and delete file follow these steps:
7. Move the cursor on .htaccess file right click on file and click on view or edit.
8. In prompt you can see that he asking that which editor you want to choose. you can choose your own editor which is install in our system. But here you choose default editor notepad, because it is easy to use.
9. Now open the file and add any txt on notepad.
10. Click on file and save it.
11. Within few seconds you see prompt check the box and click on yes
Now .htaccess file is update on web server.
12. When you are login your web server ensure that you are in correct directory or not.
13. Right click on the file and choose
14. On prompt you can see that he asking him that you want to delete this file or not we click on YES.
If you want to redirect all URLS on your new site then you write this line.
Redirect 301 / https://arzhost.com
If want to redirect a single url then follow these steps.
For redirect to local site file:
Redirecting to an external site file:
Here are few examples of redirects
These lines will redirect the directories to an HTML file
These lines redirect html index files to different directory.
These lines load a gif files from different sites
you can redirect error massage 404.rather than by send a 404 page. These lines will redirect to homepage.
If a user open page which is not exist then 404 error will present. you can redirect non-existing page to index.php by sing these lines.
If you want to write www in your URL address then you follow these lines of code.
If you want to remove www in our URL then there is a minor change in code. which you use to enforce www in URL .
These lines are link to non-existing folder or files. If files or folder exist then it load automatic.