hosted by liquidweb

Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : HTACCESS - Need help in Permanent Redirection Issue

Forum Jump

HTACCESS - Need help in Permanent Redirection Issue

Reply Post New Thread In Hosting Security and Technology Subscription
Send news tip View All Posts Thread Tools Search this Thread Display Modes
Junior Guru Wannabe
Join Date: Dec 2011
Posts: 88

HTACCESS - Need help in Permanent Redirection Issue

hello gurus,

as part of my learning, i've encountered the subject htaccess.

there is one issue i wanted to ask and clear about, if it's possible to accomplish.


i have 2 separate domain on the same server.

-country based domain,
-regional based domain,

i want to redirect my regional based domain name to a sub-domain of my country based domain.

it's like this,

shall be redirected to

and after redirection, the address bar in the browser shall display instead of

Baguio Ads | My Baguio Biz

Sponsored Links
Junior Guru
Join Date: Jan 2012
Posts: 177
Hi you use in 301 redirection for details as under:

PHP Redirect

Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location:" );

ASP Redirect

<%@ Language=VBScript %>
Response.Status="301 Moved Permanently"
Response.AddHeader "Location",""

ASP .NET Redirect

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
Response.Status = "301 Moved Permanently";

JSP (Java) Redirect

response.setHeader( "Location", "" );
response.setHeader( "Connection", "close" );

CGI PERL Redirect

$q = new CGI;
print $q->redirect("");

Ruby on Rails Redirect

def old_action
headers["Status"] = "301 Moved Permanently"
redirect_to ""

Redirect Old domain to New domain (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)$1 [R=301,L]

Please REPLACE in the above code with your actual domain name.

In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

Junior Guru Wannabe
Join Date: Dec 2011
Posts: 88
@SASA Techno

thanks... can i try this and apply while using wamp?

or do i need to create a real site, so i may test this functionality?

Baguio Ads | My Baguio Biz

Sponsored Links
Junior Guru
Join Date: Jan 2012
Posts: 177
Yes you use it but make sure which language your site crate like a PHP Or HTML. only for htaccess.


Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess redirection smrtalex Hosting Security and Technology 3 08-26-2009 04:35 AM
Namecheap permanent address redirection cyberderf Domain Names 1 05-10-2006 04:42 PM
htaccess and redirection 3-rx Web Design and Content 9 05-21-2005 10:00 PM
.htaccess redirection - How to? webzila Web Design and Content 2 01-04-2004 04:06 PM
Need .htaccess redirection Spunky Hosting Security and Technology 6 05-21-2002 05:38 AM

Related posts from
Title Type Date Posted
Weekend Issue with Twitter Link Shorteners Connected to .CO Domain: Report Web Hosting News 2015-01-26 15:34:25
Google Blacklists 11,000 Websites Infected with SoakSoak Malware Web Hosting News 2014-12-16 11:08:55
Fasthosts Shared Hosting Customers Face Downtime as DDoS Attack, Windows 2003 Vulnerability Shake Platform Web Hosting News 2014-11-18 12:59:33
More Details Surface on Major Internet Outage in China Web Hosting News 2014-01-23 16:13:49
WHMCS Security Issue Allows for Information Disclosure Web Hosting News 2013-10-25 09:30:46

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Log in with your username and password

Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Web Hosting News:
WHT Membership
WHT Membership



Welcome to

Create your username to jump into the discussion! is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.

(4 digit year)

Already a member?