Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
htaccess keeps redirecting to host's website
Old 11-21-2005, 04:20 AM htaccess keeps redirecting to host's website
Extreme Talker

Posts: 152
Trades: 0
Here is my .htaccess code, every time I upload it, it just redirects to my host's website main page. Please tell me if I have done anything wrong here or wat i can do.
Code:
DirectoryIndex index.html index.htm portal.php index.php

RewriteEngine on
RewriteCond %{HTTP_HOST} !^.*surfaceripple\.net [NC]
RewriteRule (.*) http://www.surfaceripple.net/$1 [R=301,L]

# prevent access from santy webworm a-e
RewriteCond %{QUERY_STRING} ^(.*)highlight=\%2527 [OR]
RewriteCond %{QUERY_STRING} ^(.*)rush=\%65\%63\%68 [OR]
RewriteCond %{QUERY_STRING} ^(.*)rush=echo [OR]
RewriteCond %{QUERY_STRING} ^(.*)echr(.*) [OR]
RewriteCond %{QUERY_STRING} ^(.*)esystem(.*) [OR]
RewriteCond %{QUERY_STRING} ^(.*)union(.*) [OR]
RewriteCond %{QUERY_STRING} ^(.*)UNION(.*) [OR]
RewriteCond %{QUERY_STRING} ^(.*)alert\(document(.*) [OR]
RewriteCond %{QUERY_STRING} ^(.*)SQL_INJECTION(.*) [OR]
RewriteCond %{QUERY_STRING} ^(.*)wget\%20
RewriteRule ^.*$ http://127.0.0.1/ [R,L]

# prevent pre php 4.3.10 bug
RewriteCond %{HTTP_COOKIE}% s:(.*):\%22test1\%22\%3b
RewriteRule ^.*$ http://127.0.0.1/ [R,L]

# prevent perl user agent (most often used by santy)
RewriteCond %{HTTP_USER_AGENT} ^lwp.* [NC]
RewriteRule ^.*$ http://127.0.0.1/ [R,L]

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^.*$
RewriteRule ^.*%27.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*%25.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*rush=.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*echr.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*esystem.*$ http://127.0.0.1/ [redirect,last]
RewriteRule ^.*wget.*$ http://127.0.0.1/ [redirect,last]

# prevent pre php 4.3.10 bug
RewriteCond %{HTTP_COOKIE}% s:(.*):\%22test1\%22\%3b
RewriteRule ^.*$ http://127.0.0.1/ [R,L]

# prevent perl user agent (most often used by santy)
RewriteCond %{HTTP_USER_AGENT} ^lwp.* [NC]
RewriteRule ^.*$ http://127.0.0.1/ [R,L]
RewriteCond %{HTTP_REFERER} ^.*$

Options -Indexes
Thanks,
Andy
Andy_Wilson is offline
Reply With Quote
View Public Profile Visit Andy_Wilson's homepage!
 
 
Register now for full access!
Old 11-26-2005, 03:15 PM
Yak Yak Yak Yak Yak

Posts: 593
Location: Rochester, MN
Trades: 0
It sounds like your host has something funny going on there. After you upload the .htaccess file, use your ftp "view" (not execute) function to see what is actually there. Your webhost may have some sort of restriction that is rewriting what you upload to redirect to their site.

Also, are you uploading it in ascii mode? If not, maybe that is the problem.
__________________

Please login or register to view this content. Registration is FREE
neorunner is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to htaccess keeps redirecting to host's website
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15751 seconds with 12 queries