How to redirect a particular Directory completely to another file via htaccess?

Hello Friends!!!

How to redirect a particular Directory and all it contents completely to another file using htaccess?

Today in this video we will show you how to redirect a particular directory and all its content completely towards another file via htaccess in cPanel.

Follow the steps to redirect a particular directory and all its content completely towards another file:

Step::1 Login to your cPanel interface

Step::2 Click on File Manager

Step::3 Go inside public_html

Step::4 Now reach out to that particular folder which you want to redirect.Go inside the folder and look for .htaccess file, if not present simply create one.

Step::5 Right click over the .htaccess file and choose the Edit option.

Step::6 Paste the code given below

RedirectMatch 301 ^/(.*)$ https://saifart.tk/india.html

Make sure you replace the url present inside the code with your destination url where you want to redirect.

Step::7 Finally click over Save changes and close the .htaccess file.

Now if you try to open any url of that particular folder then you will be redirected towards the url which you mentioned in the code.


For more information you can contact RedserverHost

best linux hosting solutions from redserverhost
cheap linux hosting


Hope this helps you!!!


Thanks for Reading!!!


Tags: cheap linux hostingbuy linux hostingcheap reseller hostingbuy reseller hostingbest reseller hostingcheap web hostingcheapest web hostingcheapest reseller hosting,  cheap reseller hostcheap linux hostcheapest linux hostingbest linux hostingbest web hosting