Submit a Ticket
Support Center » Knowledgebase » URL REDIRECTION FOR LINUX PLANS (.htaccess)

URL REDIRECTION FOR LINUX PLANS (.htaccess)

Using PHP Redirect:


1. Edit your web-page using File Manager or FTP Client.


2. Add the following code to your index.php web-page:

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.domain.com" );
?>


PS. Change domain.com to the URL to which you wish to re-direct the website.



Using .htaccess 301 Redirect:


1. Edit your web-page using File Manager or FTP Client.


2. Add the following to your .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]



PS. Change domain.com to the URL to which you wish to re-direct the website.



NON-WWW to WWW Redirect using .htaccess:


1. Edit your web-page using File Manager or FTP Client.


2. Add the following to your .htaccess file:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]


PS. Change domain.com to the URL to which you wish to re-direct the website.

 This answer was helpful  This answer was not helpful
 Back