No announcement yet.

How to set up a .htaccess redirect?


Unconfigured Ad Widget

  • Filter
  • Time
  • Show
Clear All
new posts
    kumkum sharma
    Junior Member

  • kumkum sharma
    You can redirect your one domain to another domain with .htaccess file.
    There are various other ways to redirect your domain:
    - Redirect from hosting control panel
    - Redirect your domain with domain control panel
    - Redirect your domain with .htaccess file

    Here we are starting with .htaccess file, .htaccess file is a server configuration file and in this file you can make changes especially if you are on shared server. .htaccess file firstly detected and executed by Apache web server according to its functionalities.
    You can add below code to redirect your old domain to new domain so that your old traffic can be redirected to new one.

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

    Leave a comment:

  • WarnerK
    Create the . htaccess file on your computer using a text editor. ...
    Use your FTP client to access your site. Make sure to set your FTP client to view hidden files.
    Go to the public_html directory.
    Upload your new . ...
    When the upload is complete, exit your FTP client.

    Leave a comment:

  • Manuel_
    started a topic How to set up a .htaccess redirect?

    How to set up a .htaccess redirect?


    Redirect 301 /example/test.html

    Cut and paste this code into your .htaccess file. "Redirect 301" means that it is a permanent redirect. You can change it to "Redirect 302" for a temporary redirect. If you have no number, then it will default to a temporary (302) redirect. Change the "/example/test.html" to your old location. Then put your new location in where it says "". You are done
    Last edited by admin; 08-17-2015, 09:04 AM.