Satış ve Destek +90 (216) 521 78 00

Sepetim Giriş Yap | Kayıt Ol
Tenik Data
How can I Redirect URLs in cPanel - TeknikDATA Hosting Hizmetleri

Bilgi Merkezi

Ana sayfa > Bilgi Merkezi > English > cPanel > cPanel > How can I Redirect URLs in cPanel

How can I Redirect URLs in cPanel

Login your cpanel

1. Click the Redirects button on the front page under the “domains”

2. Enter the address of the web page to move in the first field.

3. Enter the redirection address in the second field. (this can be a sub domain
and may be listed as a directory on home page).

4. Choose one of the following options in the list:
*Temporary or *permanent

5. Click the Add button.

Redirect URLs in cPanel Servers

Redirect Examples using .htaccess

To redirect an entire site to a new domain:

Redirect 301 /

The following performs a 301 redirect based on the clients IP address, this could be used for banning IP addresses.

Banning an IP Address using ReWrite

RewriteCond %{REMOTE_ADDR} ^(A\.B\.C\.D)$
RewriteRule ^/* [L]

To redirect a folder and all of the pages or files contained within it to another page or domain.

RewriteEngine On
RewriteRule ^foldername/* [R=301,L]

Domain redirect

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain\$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Image Hotlink protection and redirect

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yourdomain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ [L]

PHP 301 Redirect

Insert the following in your index page.

header("HTTP/1.1 301 Moved Permanently");

ASP 301 Redirect

Response.Status="301 Moved Permanently"


Force SSL/https redirect

Redirect the user to secure connection (https://) can be accomplished with a .htaccess file containing the following lines:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$$1 [R,L]

In case you wish to force HTTPS for a particular folder you can use:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} somefolder
RewriteRule ^(.*)$$1 [R,L]

The .htaccess file should be placed in the folder where you need to force HTTPS.


HTML Redirect

<meta http-equiv="refresh" content="0;url=">


Bulut Hosting Bireysel Hosting Kurumsal Hosting Bayi Hosting Uygulama Hosting Wordpress Hosting Joomla Hosting Drupal Hosting E-Ticaret Hosting Haber Hosting Veritabanı Hosting MySQL Hosting MongoDB Hosting PostgreSQL Hosting
Bulut Sunucu Bulut Sunucu Sunucu Barındırma Sunucu Kiralama Sunucu Yük Dengeleyici Bulut Sunucu Standart Bulut Sunucu Enterprise Bulut Sunucu SSD Premium Bulut Sunucu Sunucu Yük Dengeleyici Kiralama Güvenlik Duvarı Kiralama
Kurumsal Email Sunucu Standart Email Sunucu Professional Email Sunucu Enterprise Email Sunucu Bulut Email Bulut E-Posta Hosting Hosted Zimbra Spam/Virüs Gateway Mail Back Up Smart Host ETRN Hizmeti E-Posta Servisleri
Domain Alan Adı Tescil Alan Adı Transfer Alan Adı Yenileme TÜrkçe Alan Adı Kayıt Marka Tescil Marka Tescil Başvuru
CDN Çözümleri Statik Cache Hizmeti İçerik Hızlandırma Coğrafi İçerik Dağıtımı CDN Depolama SSL Sertifika Comodo SSL QuickSSL True BusinessID SSL

LiveZilla Live Help