473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to redirect a website?

127 100+
i want to redirect my old website to the new domain. if the old website url is typed it should redirect to the new domai. how?
Aug 20 '10 #1
2 1320
Dormilich
8,658 Expert Mod 8TB
probably the best way is to make the server redirect to the new URL. this can be done either via server control panel or a .htaccess file using mod_rewrite (Apache) or similar.
Aug 20 '10 #2
.htaccess should be used for this.

create a file named as .htaccess and put the below provided lines in that and upload it to the root folder of ur website

Expand|Select|Wrap|Line Numbers
  1. Options +FollowSymlinks
  2. RewriteEngine on
  3. RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
  4. RewriteRule ^(.*)$ http://www.mynewdomain.com/$1 [R=301,L]
For some more examples check this.
Aug 24 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mr B | last post by:
Howdy all, I have 2 domain names that both go to the same website. For example, if www.XXXX.com is the primary name for the website, if you type in www.XXXX.com or www.YYYY.com, they both go...
8
by: Victor | last post by:
I need to redirect to another web page, but that redirect will include the submission of form data. So, unlike ServerXMLHTTP which stays on the originating web page, I need the script to redirect...
1
by: A.M | last post by:
Hi, I am trying to use Response.Redirect to redirect the response to another website (say http://www.yahoo.com) but asp.net redirects the request to http://localhost/www.yahoo.com Which is...
5
by: Tyler | last post by:
I am developing an application which will allow me to automatically sign into an external website. I can currently do a screen scrape using HTTPWEBREQUEST. However I want to just redirect to the...
5
by: sck10 | last post by:
Hello, Using ASP.NET 2.0 I have two websites: www.OldSite/Old01/ www.NewSite/New01/ I need to redirect everything in the folder "Old01" to "New01". The folder "Old01" has 15+ web pages...
5
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks...
3
by: glezaber | last post by:
Hi, I´ve two websites stored in IIS 5.0, and what I want is to Redirect from A website to B website, the problem is that doesn´t work because if I use Response.Redirect (http://localhost:5080)...
2
by: hmchkus | last post by:
Hi, How can I integrate part of information from another website on my page? For example, a table of schedule, weather, stock info... I would like to know both way: 1. redirect the client...
56
by: UKuser | last post by:
Hi, I'm not sure if this can be done as I've searched the web and this forum. I am using an online merchant provider and I must post certain variables to their webforms through a form on my...
1
by: webandwe | last post by:
Hi, Is there a code I can use to redirect a user on a cell phone from one page to another. Basically what I want to do is if a user comes to my website on a cell phone I want to re-direct him...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.