Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-19-2003, 07:00 AM   #1
Oracle Porn
Affiliate
 
Oracle Porn's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Icq: 94-399-723
Posts: 24,433
htaccess help anyone?

I want to redirect all domains with the suffix .ru
how can I do that?
__________________


Oracle Porn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-19-2003, 07:36 AM   #2
pornanza
Confirmed User
 
Join Date: Jul 2003
Location: East Village
Posts: 238
you probably could do it with .htaccess, but i'm not feeling too clever today.

PHP version for you:

PHP Code:

<?php

 
if (eregi('\.ru$'gethostbyname($_SERVER['REMOTE_ADDR']))) {
  
header('Location: redirect.html');
  exit;
 }

?>
ryan
http://pornanza.net
pornanza is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-19-2003, 07:45 AM   #3
Oracle Porn
Affiliate
 
Oracle Porn's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Icq: 94-399-723
Posts: 24,433
i know 0 about php or any other language other than html...
where do I put this php file? in my main root?
__________________


Oracle Porn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-19-2003, 08:27 AM   #4
pornanza
Confirmed User
 
Join Date: Jul 2003
Location: East Village
Posts: 238
yeah

paste the code below into index.php in the root

PHP Code:

<?php

 
if (eregi('.ru$'gethostbyname($_SERVER['REMOTE_ADDR']))) {
  
header('Location: redirect.html');
  exit;
 }

?>
you can paste your normal HTML after ?>

ryan
http://pornanza.net
pornanza is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-19-2003, 09:07 AM   #5
icedemon
Confirmed User
 
Join Date: Jun 2003
Location: Lutz, FL
Posts: 1,022
RewriteEngine On
RewriteCond %{HTTP_REFERER} .*?\.ru.* [NC]
RewriteRule /(.*) http://someothersite.com [R,L]

I didn't test it, so let me know if it doesn't work. I also didn't know if you mean redirect referers or your own domains. If it's your own domains, change HTTP_REFERER to HTTP_HOST
__________________
Clips4Sale.com
icedemon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-19-2003, 03:06 PM   #6
Oracle Porn
Affiliate
 
Oracle Porn's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Icq: 94-399-723
Posts: 24,433
Quote:
Originally posted by icedemon
RewriteEngine On
RewriteCond %{HTTP_REFERER} .*?\.ru.* [NC]
RewriteRule /(.*) http://someothersite.com [R,L]

I didn't test it, so let me know if it doesn't work. I also didn't know if you mean redirect referers or your own domains. If it's your own domains, change HTTP_REFERER to HTTP_HOST
gives me 500 error
__________________


Oracle Porn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-19-2003, 03:35 PM   #7
icedemon
Confirmed User
 
Join Date: Jun 2003
Location: Lutz, FL
Posts: 1,022
I tested it this time on my server. It's at http://paywide.com should redirect all .ru to yahoo.com. Here is what's in the .htaccess

RewriteEngine On
RewriteCond %{HTTP_REFERER} .*?.ru.* [NC]
RewriteRule .* http://www.yahoo.com [R,L]

If it still give you a 500 error, check your error logs for apache on your account to see what it says. If you don't have access to your error logs, check with your hosting company (if you don't have your own server) to make sure you can use .htaccess files and also (this is the most important) make sure you can use ModRewrite in you .htaccess file. If you can use .htaccess or ModRewrite, just give the above code to the server admin to put it in httpd.conf for your account.
__________________
Clips4Sale.com
icedemon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.