Forum Moderators: open

Message Too Old, No Replies

New Server, Old Problem

need a little help with a common issue

         

ras230

3:16 am on Jun 4, 2005 (gmt 0)

10+ Year Member



I know this issue has been gone over a few times on this site in several places, but after spending a while looking over previous posts on the topic I feel like I'm no closer to an answer.

I switched webhosting companys not too long ago and I'm still sort of moving in. checking over my logs I noticed alot of people hotlinking to some of my files.

I hadn't seen that in a long while because I setup an .htaccess file originally to prevent that sort of thing but hadn't uploaded it yet to the new server.

I upload the file but it didn't seem to work as I had expected. it only took a moment for me to realize where the problem was.

my old host had my site on a unix system running apache, and this new host hs it is a microsoft system running iis.

I've been looking for something that will work the way the .htaccess used to.
previous posts here, and other websites in general sugested everything from creating custom ISAPI filters, editing the web.config file, editing the global.asax, installing commerical packages like HotLinkStop, requireing active sessions, setting then checking for cookies, using randomly generated file names on access, the list goes on and on, but even information I found that went into any detail on these subjects included paragraphs of code, or would require re-writing the simple html/css pages I have.

I'm all for having options but everything I've read about so far has me longing for the 4-6 lines of short and sweet code I had in the old .htaccess file.

I have one directory full of files that I'm looking to keep from being hotlinked.
not images, but things like exe, zip, and wav files.

maybe it's all just too new to me still but any help with this would be great.

pjkinann

4:49 am on Jun 5, 2005 (gmt 0)

10+ Year Member



Have you resolved this issue? I ditto it. I can't seem to find any answers on this problem. My client's hosting server company is on the IIS Microsoft server, not Apache, so apparently the .htaccess does not work. I looked up the 301 redirect, because supposedly it IS for IIS, but then it said, 301 redirect for Apache.

I am going around and around in circles, meanwhile my client is losing all his ranking on a major SE because I can't come up with a way to redirect his old pages to his new pages.

Sigh..........this is so frustrating. I thought it would be easy just to do this .htaccess file, but now I have to know ASP or something. Crazy.

SO any light you can shed on this for me, if you found a solution, would certainly be helpful.
PJ

Balloon

5:07 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



I wouldn't like to say I'm an IIS expert, but I know my way around quite well.

I don't think I've seen anything that'll do what you're after, I'm afraid.

Would be interested to hear if someone can prove me wrong!

- Chris

pjkinann

8:09 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



Okay, well, what I've had to do is use the meta refresh/redirect on each of the old pages and then reupload the old page with the redirect and letting the viewer know that if the page doesn't redirect in 5 seconds to click a specific link domian.com/page/link. Then I tested it and it works spendidly! So I'm happy.

Thanks everyone for your help.

pageoneresults

8:13 pm on Jun 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



ISAPI_Rewrite can be used just like the htaccess file. You'll need to read the documentation to confirm this but the facility is there. Your host will need to purchase a copy of ISAPI_Rewrite ($69.00 USD) and install it. From there, you can then drop an ini file in each web directory and do as you wish. :)

It can be used to allow dynamic pages to be indexed by search engines, stop hotlinking, proxy another server content, manipulate incoming request headers and strengthen server security. It supports regexp rules and conditions to create really flexible URL manipulations. And you can find a lots of examples in the product documentation.

pjkinann

9:32 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



<< Your host will need to purchase a copy of ISAPI_Rewrite ($69.00 USD) and install it.>>

Well, that would be an impossible thing to do! :) They're a big company, and I don't think just because I want to redirect some pages for one of their clients that they would purchase this. So that's a no! SMILE

But I did use the refresh/redirect on each OLD page and just reuploaded them to the server also, and they're redirecting super!

So thank you again. I appreciate it!

RossWal

9:45 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



I'm not sure that the meta tag is the way you want to go for the long term. Try googling this (without quotes):

"IIS add header asp 301 moved permanently"

pjkinann

11:10 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



<I'm not sure that the meta tag is the way you want to go for the long term>

Well, from what I understand what the refresh/redirect does redirects the old page to the new (which it does very nicely) and eventually when the crawlers have cached all the new pages, I can take the old ones off the server. But they can stay there as there are only 8 of them that needed to be added.

I Googled the 301 but it's just all Greek to me. I couldn't understand any of it. And I was looking for a simpler solution like the .htaccess file, which of course doesn't work on the client's server.

So I think maybe for now the < meta http-equiv="refresh" etc. > will work.

I'll google the phrase you gave me (can't see it from this page - have to wit until I send this post) and see what if it brings up anything I can understand or have not read.

Thank you very much for your help.

pjkinann

11:13 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



Okay, this is why I was unable to use that method also. First, I am not familiar with asp, second, my pages are not asp extensions.

It says: take the old-page.asp that is being renamed...................to your new-page.asp.

So that leaves me out too! :) No asp pages on this site.

ras230

8:17 pm on Jun 7, 2005 (gmt 0)

10+ Year Member


it's hard to imagine the MS did not include anything to prevent hotlinking.

at this point I'm stuck with renameing the file and updating the refering sites every week or so to prevent the drain on bandwidth.

most of the traffic seems to come from specific places. is there an easy way to restict an ip or an entire ip range?

ras230

7:36 pm on Jun 23, 2005 (gmt 0)

10+ Year Member



just an update on this.
I spoke with the hosting compnay and explained the issue and asked if they have a filter setup already or if one could be setup.

they said they didn't have anything that would do what I was looking for but would move my site to a apache server.

thanks for the help!