KnowledgebaseHow can we help you?

Overview

The Redirects interface allows you to send all of the visitors of a domain or particular page to a different URL.

For example, if create a page with a long URL, use the Redirects interface to add a redirect from a short URL to the long URL. Visitors can enter the short URL to access the content of the long URL.

Add a redirect

To add a redirect, perform the following actions:

  1. Select a redirect type from the Type
  • Permanent (301) — Thisoption notifies the visitor’s browser to update its records.
  • Temporary (302)— This option does not update the visitor’s bookmarks.
  1. Select a domain name from the menu, or select * *All Public Domains* *to redirect all of the domains that your cPanel account controls.
  2. In the text box to the right of the domain selection menu, enter the rest of the URL from which you wish for the server to redirect visitors. For example, if you wish to redirect http://example.com/directory.file.htmlto another URL, enterdirectory/file.html in this text box.
  3. In the redirects totext box, enter the URL to which you wish to redirect users.
  4. Select one of the following options:
  • Only redirect with www. — This option only redirects visitors who enter the prefix before the domain name part of the URL.
  • Redirect with or without www.— This option redirects all users, regardless of whether the visitor enters the  prefix before the domain name part of the URL.
  • Do Not Redirect www.— This option does not redirect users who enter the  prefix before the the domain name part of the URL.
  1. Select the Wildcard Redirectoption if you wish to redirect all files within a directory to the same filename in the new directory.
  • For example, if you enable the Wild Card Redirectoption and com redirects to example.com, then a visitor who tries to access the http://example1.com/pic.jpg URL redirects to the http://example.com/pic.jpg URL.
  1. Click Add.
  • To test the redirect, click the link under Directoryin the Current Redirects If you properly configured the redirect, the system directs you to the original domain.

 

1

2

3

4

5

6

7

8

<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>

Remove a redirect

To remove a redirect, perform the following steps:

  1. Click the red X icon () next to the redirect that you wish to remove.
  2. Click Yes.

Search your redirects

To search your redirects, perform the following steps:

  1. Enter the search criteria in the Searchtext box.
  2. Click Go.

The interface will list the redirects that match your search criteria.

To sort your list of redirects, click the appropriate table heading.

 

Was this answer helpful?

Also Read



+91 9429692542
10:00 am to 7:30 pm IST Monday to Saturday
Live Chat, Email and Tickets are available 24/7

HostAdvice Great Uptime Award for Gen X Web Hosting
Gen X Web Hosting Reviews