Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
How to redirect people not from my site?
Old 02-13-2009, 12:15 PM How to redirect people not from my site?
Average Talker

Posts: 29
Trades: 0
How does one make people who come from another domain and not my domain go to a specific page instead of the inside page that they went to from the outside link? Say, people who came from search engines.

Thanks in advance for your assistance.
noobster is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-13-2009, 09:41 PM Re: How to redirect people not from my site?
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
Quote:
Originally Posted by noobster View Post
How does one make people who come from another domain and not my domain go to a specific page instead of the inside page that they went to from the outside link? Say, people who came from search engines.

Thanks in advance for your assistance.
This could be done with php using $_SERVER['referer'] so if that doesnt have your domain in it redirect to x page


but this will be TERRIBLE for SEO!!! because you would end up with just one page indexed by google and it would pee off visitors!
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 02-13-2009, 11:41 PM Re: How to redirect people not from my site?
Average Talker

Posts: 29
Trades: 0
Can it be done on the server without using PHP? The site is in HTML. Thank you Dan.
noobster is offline
Reply With Quote
View Public Profile
 
Old 02-14-2009, 02:16 AM Re: How to redirect people not from my site?
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
Quote:
Originally Posted by noobster View Post
Can it be done on the server without using PHP? The site is in HTML. Thank you Dan.
PHP is a dynamic server side language, and html is a static client side language.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 02-14-2009, 05:01 PM Re: How to redirect people not from my site?
Average Talker

Posts: 29
Trades: 0
Am I on the right track?

Code:
  RewriteCond %{HTTP_REFERER} (yahoo.com | msn.com | google.com)
  RewriteRule (.*) http://www.domain.com/$1 [L]
Thanks Adam for the information.

Last edited by noobster; 02-14-2009 at 05:05 PM..
noobster is offline
Reply With Quote
View Public Profile
 
Old 02-14-2009, 07:20 PM Re: How to redirect people not from my site?
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
Quote:
Originally Posted by noobster View Post
Am I on the right track?

Code:
  RewriteCond %{HTTP_REFERER} (yahoo.com | msn.com | google.com)
  RewriteRule (.*) http://www.domain.com/$1 [L]
Thanks Adam for the information.
You should look into either storing the links in a file or a database.

PHP Code:
<?php
if (isset($_GET['go'])) {
    
$send $_GET['go'];
        include(
"links.php");
        
header("Location: $link[$send]");
    } else {
        
$p $_GET['p'];
}

if (
$_GET['url']) {
     
$db fopen('links.php','a');
     
$rand rand(0,10000000);
     
$data $_GET['url'];
     
$message "\n<?php \$link[" $rand "] = '$data'; ?>";
                
fwrite($db,$message);
      print 
"<a href='http://www skinnyurl co nr/?go=$rand' target='_blank'>Url</a>";
}
?>
This is a insecure way to do this, but its also easier (I made this a while ago).

Example here or Redirect Example
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


Last edited by Decaf; 02-14-2009 at 07:23 PM..
Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 02-16-2009, 01:57 PM Re: How to redirect people not from my site?
Average Talker

Posts: 29
Trades: 0
Adam, cool code. I think I will stick with mod rewrite for now. Thanks for sharing the code.
noobster is offline
Reply With Quote
View Public Profile
 
Old 02-16-2009, 08:53 PM Re: How to redirect people not from my site?
vangogh's Avatar
Post Impressionist

Posts: 10,689
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Out of curiosity why would you want to do this? It seems like you're trying to force people to enter your site through one page (Your home page?). The only thing that will guarantee is that most people won't find what they're looking for and leave.

Let people land on deeper pages of your site. If anything you want to direct people to deeper pages as quickly as possible.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 02-16-2009, 09:06 PM Re: How to redirect people not from my site?
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
Quote:
Originally Posted by vangogh View Post
Out of curiosity why would you want to do this? It seems like you're trying to force people to enter your site through one page (Your home page?). The only thing that will guarantee is that most people won't find what they're looking for and leave.

Let people land on deeper pages of your site. If anything you want to direct people to deeper pages as quickly as possible.
If your barack obama, and you want people to visit the donate page before they see your /index.php page you could use this.

Aka, If your looking for something before you give something then use this.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 02-16-2009, 09:23 PM Re: How to redirect people not from my site?
vangogh's Avatar
Post Impressionist

Posts: 10,689
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
But would you really expect a donation before you let people read some of the content on the site? In the case of President Obama, sure we know who he is in advance and you've probably made the decision to donate or not before arriving at the site.

However for most of us it's best to let people get to the content they want instead of trying to force them to see something we want.

Imagine you searched Google for "How to redirect people not from my site" Odds are this thread will rank #1. You click the search result and instead of finding the thread you thought you were visiting you're taken to the home page of the forum. I can't speak for you, but I'm going to hit the back button and click result #2 before I start searching through the forum for the thread.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 02-16-2009, 09:45 PM Re: How to redirect people not from my site?
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
@vangogh

Nice to see i am not the only one who seems to have some common sense left...

$common_sense['vangogh']++;
:| seriously? why?...

O well, i am learning to take this thing in a positive light more people like this the more money i can make from consultation work in the future. Go me.

Dan =]
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 02-16-2009, 09:45 PM Re: How to redirect people not from my site?
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
Quote:
Originally Posted by vangogh View Post
But would you really expect a donation before you let people read some of the content on the site? In the case of President Obama, sure we know who he is in advance and you've probably made the decision to donate or not before arriving at the site.

However for most of us it's best to let people get to the content they want instead of trying to force them to see something we want.

Imagine you searched Google for "How to redirect people not from my site" Odds are this thread will rank #1. You click the search result and instead of finding the thread you thought you were visiting you're taken to the home page of the forum. I can't speak for you, but I'm going to hit the back button and click result #2 before I start searching through the forum for the thread.
Sorry, I'm not trying to argue with your points (I agree with them completely) I'm just trying to provide the other users with reasons as to why the OP wants to do what he is doing.

In fact, this extra discussion actually is pushing this thread up on the "relativity" and "useful ness" charts. The idea that an organization/company expects/wants a service from the user before the provider does any work is almost mind boggling. But then lots of websites/company's are only out to make money and really don't care about there users.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 02-16-2009, 11:41 PM The reason why is
Average Talker

Posts: 29
Trades: 0
Because these people are just coming in and getting my graphics from google and other search engines. I want them to see some content.
noobster is offline
Reply With Quote
View Public Profile
 
Old 02-17-2009, 04:53 PM Re: How to redirect people not from my site?
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
Well there are better ways to stop stealing your graphics...

For a start you should have all images hotlink protected, which adds a little more work to anyone stealing your graphics.

Also you shouldnt just have graphics if you want to show of content, now obviously i have no clue what site this is about so cant look at it to give a real answer but.

if you have text around the graphics any decent user is likely to read some of the text as well, and if they dont then there isnt much point caring about them, but if they dont read it because its uninteresting or poorly written, then there is no reason for them to look.

I tend to have a rule of thumb of make good content for users and users will come.

But honestly this kind of technique is more likely to annouy any REAL user who might of looked at your content and make them leave and never come back. i know it would be like vangogh said if you follow a link because you want that content then you want that content you dont want to be messed around.

Also as i said it will screw up your SEO and mean even less people come to your site to view content...

Dan.
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 02-18-2009, 07:57 PM Re: How to redirect people not from my site?
vangogh's Avatar
Post Impressionist

Posts: 10,689
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
@Adam - Don't worry. I never thought we were arguing. I figured we were helping make the discussion more useful just like you said.

@noobster - that's understandable, but it's a different situation than what you first described. You can prevent hotlinking like Dan suggests and you can still send people to different pages based on referrer as Adam suggested. However keep in mind that if the only reason someone is visiting your site is to grab an image it's unlikely sending them to another page is going to make them read your content. You'll do better to work on building more targeted traffic.

If you want to prevent people taking your images then sure go ahead and make it a little harder for them, but in all honestly the people you're trying to redirect probably aren't going to care about your content. That's not a knock on your content either. It's just that those people are really only interested in one thing, which is your image.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 02-19-2009, 02:05 AM Re: How to redirect people not from my site?
Novice Talker

Posts: 5
Trades: 0
Great advice. Thanks for sharing.
weedle is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to redirect people not from my site?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.69592 seconds with 12 queries