Redirect Configuration
Posted 24th октомври, 2018
Redirects send a visitor from their requested page to another, sometimes based on specific criteria. These are usually configured in a .htaccess
file, which can be placed in any folder and applies to all folders beneath it recursively.
Redirects can be set manually, following this comprehensive guide.
However, cPanel features an excellent redirects tool which will automatically create these directives for you.
- Click
Redirects
- If you have multiple domains, you should choose the one that you wish to redirect
- Enter the sub-folder you wish to redirect or leave this blank
- Choose whether you wish to redirect the whole domain (Wildcard) or just direct hits
- Enter the destination URL and click
Save
.
Note: Checking the Wild Card Redirect Box will redirect all files within a directory to the same file-name in the redirected directory. You cannot use a Wild Card Redirect to redirect your main domain to a different directory on your site.
If you now visit your URL you should see that the redirect has taken affect. If it does not then it could be that some other redirect (for instance a Wordpress setup) is interfering with your redirects. Check that your redirect is at the top of your .htaccess
file.