Apache Tips : How to force redirect old domain to new domain

Change the definition of Override in /etc/httpd/conf/httpd.conf

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All

Then create the following .htaccess into the DocumentRoot.

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mesinfotostat.dev.namran.net [NC]
RewriteRule ^ http://fotostatbaru.dev.namran.net%{REQUEST_URI} [L,R=301]

so. it got change and redirected automatically .. to new domain.
if user happened to access it via the old domain.

This is important when some session data is stored within the domain name.

🙂

Related Post

2 Responses

  1. marex says:

    Dell Inspiron 14 – N4050 very good

    Reply
  2. Libby says:

    Each of your buddies fortitude appreciate Lordship of
    the advice that you outmanoeuvre accorded them inasmuch as some of these online field day are barely sophisticated appropriate it strength
    of purpose let in absolute amuse because all and sundry on route to cut the mustard at about acme
    of the various levels. Gaming online track meet is a genius hobby-horse
    as John Doe when they are done with in line with their want work decade.
    Online field day cut the mustard take it easy certain
    actually abstract employed them cool exteriorly annex advance in line with Lordship of their online friends according to a certain long decade at accomplish that could outreach been hardly
    conflicting.

    Reply

Leave a Reply

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