473,544 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best Option For Redirect

omerbutt
638 Contributor
Hi ,
i was in an argue with one of my colleagues on redirection i have been using the .htaccess for redirecting urls to new domain urls , now the question is that if i have changed my domain to a new domain lets say from abc.com to xyz.com and i have the same name of the pages and everything , i want that my old urls lets say

abc.com/profile/omer


should be redirected to

xyz.com/profile/omer


what my colleague recommends is to use
Expand|Select|Wrap|Line Numbers
  1. strstr()
  2.  
and find the domain name (abc.com)in the url and replace it with the new domain (xyz.com) and include it in the config file which is already included in all pages , and not to use the .htacess redirect as we have to type in all the urls into the .htaccess file , seems to be short though and quick , but i always go for the safest option , what do anyone of you recommend doing , one more thing the way strstr() is used that means that all the pages need to exist on the old site (abc.com) as well as new site (xyz.com) would that cause any difference to the indexing on google? or would the similar text on both the domains create the problem for the bots? , any SEO regarding problem using the strstr() method?
Reagrds,
Omer Aslam
Jun 17 '11 #1
2 1647
Markus
6,050 Recognized Expert Expert
If you will be redirecting all pages from your old domain to your new one, a simple redirect from the server (via .htaccess or whatever) would suffice. Something like:
Expand|Select|Wrap|Line Numbers
  1. RewriteRule ^(.*)$ http://newdomain/$1 [R=301]
  2.  
Jun 17 '11 #2
nathj
938 Recognized Expert Contributor
The advatnage of using .htaccess is that you can specify it as a 301 redirect. This method maintains any link equity that you may have built up with search engines like Google and Yahoo.

Which is what Markus is doing with the '[R=301]' part of the line.

If you do it with php functions you will damage the link equity you have built up.

Cheers
nathj
Jun 21 '11 #3

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

Similar topics

3
1916
by: Paul Say | last post by:
I have a asp.net application that will need to create a document/report from data in a database. The user will fill out a form supplying various criteria for parameters. I would like the document/report to then be displayed on screen as well as the option to download in PDF format. I am just wondering which is the best reporting development...
3
1152
by: Gustavo | last post by:
Does anyone know what would be the best way to have a website have access to the clients computer (with his permission ofcourse when ) so he can save and upload files by the click of a webform button (without getting save as dialogs) Is ActiveX the best solution? Is this technology the best we should use for running full permission code in...
2
1165
by: jetal15 | last post by:
To develop a Framework for Content management system, which contians three part 1) core part 2)Data storage and retrival and 3)Workflow In Core part there is need to develop communication layer in such a way that it can be run in a distributed architectur or locally on one machine, if the system is in distibuted environment communication...
5
1539
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Hi, I need to store lots of product images. I was thinking of storing the paths in the database but overtime it may become cumbersome as I'll be dealing with lots of images. I would need to display both a thumbnail and large versions. The average size per image is 400kb and the max display is 1702 by 2542. Would SQL Server be a good...
9
6612
by: | last post by:
In my database I have a 'control table' in which basic info is stored about the application, for instance the application's path and the name of the company that is using it. In all of the application's reports I have a page footer with an unbound field that retrieves and shows the name of the company. This is done by Dlookup. My question is: is...
4
1354
by: cprot225 | last post by:
I am a web developer who works plenty with SQL Server, and I really know very little about Access. But I have a project now that requires me to know something about it so I've been doing quite a bit of research. Briefly: A definitive data set is kept in SQL server. An important user needs a copy of this data in her local copy of Access....
1
5173
by: mh | last post by:
I'm porting a C lex/yacc based project, and would like to redo it in python. What's the best option for a python lex/yacc-like? I've googled a few things, but wanted to see the current concensus. Many TIA! Mark --
1
1206
by: Michael Fuller | last post by:
We are currently searching for a solution to manage data. We have a bunch of laboratory and field analytical data in an Access 2003 database. We also have some plant process data that is recorded in a Wonderware Historian data server, which I think is based upon MS SQL Server. We often have need to look at some of the data from each...
0
1300
by: Carles Bolaños | last post by:
Hello everyone I have develop a plugin based Job scheduler in C++. This program is console based and multiplatform. Implements a list and the plugins have the logic of the job, the program only sequence or parallel the jobs. I need a front end for monitor the queue status, change jobs priorities, etc... not only monitor, and I don't know...
0
7431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7370
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7617
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7779
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7387
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7714
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3415
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1848
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
674
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.