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.

The Google Forum


You are currently viewing our The Google Forum as a guest. Please register to participate.
Login



Reply
Script for page redirect
Old 11-19-2005, 05:30 AM Script for page redirect
Junior Talker

Posts: 1
Trades: 0
Hi Guys

Before a month I got a script for page redirection from somewhere in the forums.

var pAddy = self.location.href;
var pHost = self.location.hostname;
var pPath = self.location.pathname;
var nuLoc = 'http:/' + '/www.' + pHost + pPath;
if(pHost.indexOf('www.') == -1) self.location.replace(nuLoc);

save this file on server name it, suppose abc.js

Then call this .js page to home page of your website
<SCRIPT language="JavaScript" src="abc.js"> </SCRIPT>

It really works.

Now I would like to know, does it effect my website in one or other way. If anybody knows about this script and its cons please reply this post.
BluEnt is offline
Reply With Quote
View Public Profile Visit BluEnt's homepage!
 
 
Register now for full access!
Old 11-19-2005, 05:38 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It certainly could

everypage beyond the one with the redirect script is invisible to the SE spiders.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-19-2005, 08:25 AM
Super Talker

Posts: 117
Trades: 0
yea JS redirection is not good, because it only redirects javascript enabvled users, and wont redirect spiders. I would recommend a server side redirection script. But then there might be problems with XSS hacking, so you should input check for that. I do not know how to do this type of attack, and i don't know if it would apply to the bottom script. Bujt just to be sure:

Possibly in PHP something like:
<?php
ob_start();
$_GET = Array(); // security
header("Location: http://www.designplanet.biz");
ob_end_flush();
?>
__________________

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

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

Please login or register to view this content. Registration is FREE
execute is offline
Reply With Quote
View Public Profile Visit execute's homepage!
 
Old 11-24-2005, 04:48 AM
WilliamC's Avatar
Skilled Talker

Posts: 51
Trades: 0
Javascript redirects are seen by google as sneaky and generally construed as blackhat. Use a proper 301 to redirect where you need.
__________________
William Cross

Please login or register to view this content. Registration is FREE
WilliamC is offline
Reply With Quote
View Public Profile Visit WilliamC's homepage!
 
Reply     « Reply to Script for page redirect
 

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.19472 seconds with 12 queries