Important:
If you use a third-party application or content management system to add a redirect, such as WordPress®, the redirect may not function properly. When you add a redirect with cPanel interface, the system places redirect rules at the bottom of the .htaccess
file. Some third-party applications ignore the rule that you add, because those applications only read rules and configurations that their section of the .htaccess
file contains.
The following example displays the configuration that you must add to the top of the .htaccess
file to add a redirect for the Drupal content management system.
In the following example:
drupal.user.example.com
represents the URL to redirect.-
http://cpanel.net/
represents the URL to which to redirect.12345678<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{HTTP_HOST} ^drupal\.user\.example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.drupal\.user\.example\.com$
RewriteRule ^cptest$ "http\:\/\/cpanel\.net\/" [R=301,L]
</IfModule>
Note:
You cannot edit a redirect. To modify a redirect, you must delete it, and then recreate it.
The Current Redirects table
The Current Redirects table lists the redirections that currently exist on your account.
To search for a redirection, enter the search criteria in the Search text box and click Go.
The table lists the following information about redirections:
Label
|
Description
|
---|---|
Domain | The domain to redirect. ALL represents all of the account's publicly-available domains. |
Directory | The directory to redirect. Click the link to test the redirection. |
Redirect Url | The URL to which you wish to redirect users. |
Type |
|
Match www. | Only redirect visitors who enter the www. prefix before the domain name part of the URL. |
Wildcard |
Redirect all files within a directory to the same filename in the new directory.
|
Actions |
Available actions for the redirection:
|