![]() |
htaccess help anyone?
I want to redirect all domains with the suffix .ru
how can I do that? |
you probably could do it with .htaccess, but i'm not feeling too clever today.
PHP version for you: PHP Code:
http://pornanza.net |
i know 0 about php or any other language other than html...
where do I put this php file? in my main root? |
yeah
paste the code below into index.php in the root PHP Code:
ryan http://pornanza.net |
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 |
Quote:
|
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. |
All times are GMT -7. The time now is 06:36 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123