Question: How to set up 303 / 302 / 301 redirect?

Answer: There are two options: to set up redirect in ISPmanager control panel or to edit .htaccess file.

You should use only one of these methods to set up 303 / 302 / 301 redirect otherwise you might face some problems.

1. Setting up redirect in ISPmanager control panel.

Go to the “World Wide Web” menu- “Redirects”.

Click «create» button and select the domain for which you will set up redirect in the appeared menu.

In the URL path – specify the location of a file or a folder in relation to the www directory, which is in the user’s home directory. Instead of processing this URL when addressing it, the web-server redirects the browser. Path must begin with a “/”. You can use Latin letters, numbers and punctuation “-“, “.”, “_”, “/”. For example: / index.html, / cgi-bin/external.pl, / forum / form.php.

Then select the appropriate error code.

In URL — specify either internal (on the same WWW domain) or external URL, that is to trigger redirect. If URL is internal, the value of this field must begin with a “/”; if it is external, then with “http://”, “https://”, “ftp://”, etc.

2. Making of redirect in .htaccess file.

To redirect from one page to another, it is necessary to indicate the following line:

Redirect [status] /oldpage.html http://yourdomain.com/newpage.html

where [status] — an optional field that can determine the return code. Possible status values:

permanent (301 — page moved permanently)
temp (302 — page moved temporarily)
seeother (303 — view another)
gone (410 —deleted )

/oldpage.html – location of a file or a folder in relation to the www directory, which is in the user’s home directory and http://yourdomain.com/newpage.html — full path to the new page.

/oldpage.html 303 / 302 / 301 redirect s now set up!

Tagged:

Leave a Reply

Your email address will not be published. Required fields are marked *