URL Masking?

Aditya

Skilled
Hey guys..

Ok, its not exactly URL Masking.. But something similar..

I have a problem..

Ive set up a website @ say website2.com..

I also own website1.com...

Now, My whole website is at website2.com, but I want to give people the link of website1.com, and redirect it to website2.com.

Re-Direction is already enabled. Now, When I go to website1.com, It gets redirected, and in the address bar, it shows website2.com..

I want to show only website1.com, Not website2.com/blahblahblah.php

Website1.com doesnt have any hosting, Its just a plain Domain.

Right now, I cant transfer domains.. So thats outta the question.. Maybe later i will be able to..

So, any ideas?

Im using Joomla, If its of any importance =X.

Thanks,

Ad1tya
 
there are a couple of ways to do this.

1. using an iframe

website1.html<html><body><iframe width=100% height=100% style='border:0px' border=0 src='~/full/path/to/website2.html'></body></html>

heres link to info on iframes.

2.using php's fopen command for cross-domain data retrieval

3. http://en.wikipedia.org/wiki/Rewrite_engine]url rewriting [/url] ,and like what our friend mentioned ^ above .

So choose one that suits your needs :)
 
Hey.. Thanks..

I know about iFrames, but the issue is if you press the refresh button, youll go to the main page =X...

Ill look into the other 2 options...
 
Easiest way is to mirror website1 with the website2 URL, no one will be able to tell the difference. You'll have to figure out if your hosting provider allows you to do this - check your control panel.
 
what control panel are you using? There are two simple ways to do it

Add an Alias(mirroring) : Add the domain as an alias to the already existing domain of main site. http://site-a.com/blah.php = http://site-b.com/blah.php

img1.JPG


Redirection : Depending on what level of customization your control panel allows. you can redirect all request to a domain or a certain page on domain

img2.JPG


speaking of joomla, it has many components to use mutileple domains. look in extensions section.

HTH
 
Use Mod_rewrite.

U can use .htaccess in the first sites base directory. And write the re write code.

should be something of this sort..

RewriteEngine On

rewritecond %{http_host} ^website1.com

rewriteRule ^(.*) http://www.website2.com/$1 [R=301,L]
 
I wouldn't recommend anyone playing around with .htaccess unless you know what each command does... you could easily take your site down with bad commands.
 
always keep a backup ;)

actually mod_rewrite is a very efficient way to do conditional redirects. however bad expression format can spike CPU usage and heavy traffic on such sites can bring down the server.
 
i didn't quite get what you meant but if you intend to keep two url's that point to same content from two domains, you can bet on one thing, google will penalize you in no time for duplicate content.

its far better to use mod rewrite set a 301 and keep one url. its your call in the end based on what you want to accomplish.
 
^^ You can stop crawlers on one using mod_rewrite. Let them crawl only one. But then you will loose out on the other domain in search engines.
 
thats why i said depends on what he wants to do with the domain.

Matt Cutts stresses on the issue(search for matt cutts radio broadcast. So its critical to stop crawling or not do it the way he wants to preserve rankings
 
Arya said:
what control panel are you using? There are two simple ways to do it

Add an Alias(mirroring) : Add the domain as an alias to the already existing domain of main site. http://site-a.com/blah.php = http://site-b.com/blah.php

img1.JPG


Redirection : Depending on what level of customization your control panel allows. you can redirect all request to a domain or a certain page on domain

img2.JPG


speaking of joomla, it has many components to use mutileple domains. look in extensions section.

HTH

Arya, I have the exact same CPanel, H-Sphere Control Panel.

I have already done exactly that, but its not working.

Changed the IP's in the DNS configuration too.. It doesnt seem to be working..
 
i assume nameserver settings are correct for you.

you need to point both of them to same nameservers, add one domain and go to web options > Alias > Add Alias. That will add one as an alias of another.

If you want one to set a redirect, Add both domains as independent ones. choose the redirect option from domain and it should be good. You dont need to change anything in dns configuration.

In case it doesnt work out....meet me on MSN so i can check the cp and find out what is wrong. with H-sphere it should be fairly easy, could have been a pain with cPanel though.
 
Back
Top