Redirecting to URL

I have a dst-nat rule to redirect non-paying customers to a web page that informs that their account has been temporarily suspended. It’s very effective and I almost always get payment within 24 hours or enabling the rule. I’m redirecting to a particular IP address, but is it possible to also do this by URL?

No, because the dst-nat rules work on the ip layer, and to change urls you would need to inspect/change the packets’ content.

I did find a solution to this problem… I redirected the users to an IP / port on my IIS web server. I told IIS that the 404 error page was the same as the main page. This way no matter what URL they typed it would redirect to this page. I actually did this as an advertising method for my web hotspots but there’s no reason it wouldn’t work for nonpaying customers :slight_smile:

Even if you went to http://www.cnn.com/blah/blah it would “404” but the 404 error page was the same as the main page so it would always work no matter what the URL.

If you are worried about google.com finding and indexing your site, you should also send a response code of 404 on that generic page. . . otherwise google just thinks its another page and crawls it - soon you start losing ranking. Make sure to use a 404 page that also spits out a 404 response code in the http header.

from experience. . .

Sam

if that would be the reason, then there is an easier way:
http://www.google.com/intl/en/webmasters/3.html#removed

Lets just say that they ‘dislike’ seeing a 404 page that is not really a 404 page. I read up somewhere that they started penalizing for that infringement and when I changed it my site went way back up in the results (since the doubling of their pages screwed most of us).

Sam

actually you can make a custom 404 page for apache. i don’t know about IIS

Possible in IIS, too…

I know this is way off topic- but its good info to know. The 404 page in apache and IIS are great, but when you change it from the default it does not still send a 404 response code to the browser. It simply sends a 200 just like any other page does. Unless you force your custom page to send a 404 then google will penalize your site if it digs down and sees every page is valid - with the same content as every other page. This is just like a catch-all mailbox, every address is valid and pretty soon it gets pounded.

Sam

Well as it should be, if you create NEW site (different IP) that serves no other purpose than telling your customer that they didn’t pay the bill, I don’t think google would ever get to it to index it, right? I have it setup on a separate port on my IIS server, and seeing that it takes ANY site address and puts that page in its place, google should never see it. If it were a problem though you could firewall the site from the outside world… Remember , a 404 page is a per-site option, not per-server.

My ad page was only viewable by publicly connected clients who tried to access my hotspot network without being an authorized user, and it listed pricing, etc.

Yep - i think in your case this is totally fine. I was mentioning it to those who are dealing with trying to get better rankings in google on their particular site. In many cases the generic 404 is good - simply add a ‘response.statuscode = 404’ to the asp page or similiar language and its even better, you can still use custom content, just keep it a 404 page.

Sam