Jump to content

spipe

Members
  • Posts

    6
  • Joined

  • Last visited

spipe's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hey all... Just had a customer call stating that they wanted us to perform a 301 redirect for all of their pointed domains. This is not a problem as long as you have the same number of unique sites in IIS to perform the redirect. His reasoning is that certain search engines (Yahoo!, not Google) penalize the results for sites when they appear numerous times from different domains to the same IP address via a standard domain pointer. Well, it is against Hostmysites policy and TOS (Terms of Service) to provide the equivilent of more than one site without it being paid for. So as far as this goes we cannot perform this for you. HOWEVER... you can do this for you and it works wonderfully!!! Via the wonders of ASP we can modify the headers to state that a 301 Permanent Redirect is occuring... So here's the code for anybody else interested... Code: dim safeURL '***** ONLY CHANGE THE LINE BELOW ***** safeURL = "YOUR_DOMAIN_NAME_HERE.com" 'domain name WITHOUT the www. prefix '***** ONLY CHANGE THE LINE ABOVE ***** dim requestedURL dim requestedWithPre dim pre dim sendTo pre = "www." requestedURL = LCase(Request.ServerVariables("SERVER_NAME")) If InStr(1, requestedURL, "www.", 1) = 1 Then requestedWithPre = True If (requestedURL <> safeURL) AND (requestedURL <> pre & safeURL) Then sendTo = "http://" If requestedWithPre Then sendTo = sendTo & pre & safeURL Else sendTo = sendTo & safeURL End If Response.Status = "301 Moved Permanently" Response.AddHeader "Location", sendTo End If Found this on a forum wondered what it did?
  2. Wow thanks Im glad you people have this forum for idiots like myself really helps.
  3. Ok so how do I use these examples? The DOM i have no clue how to create this do I put it in tags a file or how? I am wanting a redirect in an iframe but have a src link on another server I want this for search engine perposes.I am 2 hours old in javascript so talk to me like a moron please I dont mind lol.
  4. Hello new to the forum and new to javascript and anything related to java. I have been looking into iframes and was wanting to take this code <iframe name="I1" src="http://www.maxmoneycasino.com" style="width:100%;height:100%" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0">Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></p>and have it in a js file so I can link it with a <script language="Javascript" src="http://gamblefacts.com/redirect.js"> </SCRIPT>I am sorry if this is unclear please post if you need more information.
  5. Is there a way with javascript to mirror another site from a webpage on your domain (kind of like a gateway webpage) with out frames ?
  6. I have 2 webpages 1 with a javascript code one with out if you notice the one with a javascript link actually opens or streams content from another domain with out leaving the domain you are on both of these are the same page as I said one has a short javascript code one does notNo JavascriptnojavascriptWith a short javascript codewith javascript insertedHere is the only thing different between the 2 pages<script language="Javascript" src="http://www.web-tfx.com/dirAdmin/WebClients/clients.asp?KW=online casino&domainID=263"></SCRIPT>Here is the directory so you can download the source veiw the 2 webpagesIf I could figure this out I would be a happy man I have spent hours scratching my head and looking all over with no success. I Know very little javascript and am asking for some help in understanding.If you know the javascript code to do this or the method please post
×
×
  • Create New...