XFileSharing Pro - .htaccess file assistance needed

Message
Author
Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

.htaccess file assistance needed

#1 Postby Jesse202 » Jun 15, 2012 3:21 pm

Current xfile .htaccess
deny from 10.0.0.182

AddDefaultCharset utf-8
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_CGI_AUTHORIZATION:%1]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([0-9A-Za-z]{12})(\/.+|\.html?|$) /cgi-bin/index_dl.cgi?op=download1&id=$1&fname=$2 [L]

RewriteRule ^embed-([0-9A-Za-z]{12})\.html$ /cgi-bin/index_dl.cgi?op=video_embed&file_code=$1 [L]
RewriteRule ^embed-([0-9A-Za-z]{12})-(\d+)x(\d+)\.html$ /cgi-bin/index_dl.cgi?op=video_embed&file_code=$1&w=$2&h=$3 [L]
RewriteRule ^embedmp3-([0-9A-Za-z]{12})\.html$ /cgi-bin/index_dl.cgi?op=mp3_embed&file_code=$1 [L]

RewriteRule ^mp3embed-([0-9A-Za-z]{12})\.mp3$ /cgi-bin/index_dl.cgi?op=mp3_embed2&file_code=$1 [L]
RewriteRule ^vidembed-([0-9A-Za-z]{12}) /cgi-bin/index_dl.cgi?op=video_embed2&file_code=$1 [L]

RewriteRule ^box$ /cgi-bin/index_box.cgi [L]

RewriteRule ^$ /cgi-bin/index.cgi [L]
RewriteRule ^free([0-9]+)\.html$ /cgi-bin/index.cgi?op=registration&aff_id=$1 [L]
#RewriteRule ^checkfiles\.html$ /cgi-bin/index.cgi?op=checkfiles [L]
RewriteRule ^contact\.html$ /cgi-bin/index.cgi?op=contact [L]
RewriteRule ^premium\.html$ /cgi-bin/index.cgi?op=payments [L]
RewriteRule ^login\.html$ /cgi-bin/index.cgi?op=login [L]
RewriteRule ^catalogue(.*)\.html$ /cgi-bin/index.cgi?op=catalogue&date=$1 [L]
RewriteRule ^news([0-9]*)\.html$ /cgi-bin/index.cgi?op=news&page=$1 [L]
RewriteRule ^n([0-9]+)-.*\.html$ /cgi-bin/index.cgi?op=news_details&news_id=$1 [L]
RewriteRule ^faq\.html$ /cgi-bin/index.cgi?op=page&tmpl=faq [L]
RewriteRule ^rewards\.html$ /cgi-bin/index.cgi?op=page&tmpl=rewards [L]
RewriteRule ^tools\.html$ /cgi-bin/index.cgi?op=page&tmpl=tools [L]
RewriteRule ^tos\.html$ /cgi-bin/index.cgi?op=page&tmpl=tos [L]
RewriteRule ^splash\.html$ /cgi-bin/index.cgi?op=page&tmpl=splash [L]
RewriteRule ^links\.html$ /cgi-bin/index.cgi?op=links [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^pages/([a-z0-9\-\_]+).html /cgi-bin/index.cgi?op=page&tmpl=$1$2 [L]

RewriteCond %{QUERY_STRING} .*page=[0-9]+.*
RewriteRule ^users/([0-9A-Za-z\-_]{4,64})/?([0-9]+|$) /cgi-bin/index.cgi [L,NC,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^users/([0-9A-Za-z\-_]{4,64})/?([0-9]+|$) /cgi-bin/index.cgi?op=user_public&usr_login=$1&fld_id=$2 [L,NC]

RewriteRule \.pm$ /404.html [L]

ErrorDocument 404 /404.html
But I need to have this to the file:
RewriteEngine on
RewriteBase /
RewriteRule ^backup.php$ 404 [L]
RewriteRule ^class.php$ 404 [L]
RewriteRule ^database.dat$ 404 [L]
Now this should be straight-forward. Just adding this to the footer, but no. I've tried it a million different ways and it does not read it.

RewriteRule ^backup.php$ 404 [L]
RewriteRule ^class.php$ 404 [L]
RewriteRule ^database.dat$ 404 [L]

If I make a .htaccess file with just the 2nd quote, it works just fine. the site just shuts down because none of the xfile info is in there.

HKirste
Posts: 5
Joined: Mar 25, 2012 4:41 am

#2 Postby HKirste » Jun 16, 2012 7:01 am

Try adding this at the bottom without any Rewrite engine and base

Code: Select all

RewriteRule ^backup\.php$ /404.html [L] 
RewriteRule ^class\.php$ /404.html [L] 
RewriteRule ^database\.dat$ /404.html [L]

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#3 Postby Jesse202 » Jun 16, 2012 6:41 pm

Thanks for the reply, but that's a no go there. My server management company said there's a issue with the current file and adding this one in. My guess is something to do with the mention of index. So I'm lost.

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#4 Postby Jesse202 » Jun 16, 2012 10:47 pm

This line here is causing it to conflict with the ad system verification:

RewriteRule ^$ /cgi-bin/index.cgi [L]

anyway to work around this?

It seems the verification to make the ads system work checks for the rules first, but to make imgah.com load it also has to forward to /cgi-bin/index.cgi.

universe
Posts: 67
Joined: Mar 20, 2012 12:13 pm

#5 Postby universe » Jun 16, 2012 11:11 pm

I Don't think that clickjacking is a good way of monetization, this only brings the whole industry in an even worse light than we use to be...

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#6 Postby Jesse202 » Jun 16, 2012 11:28 pm

I thought I said it in this thread, but I guess it was the other:

I don't care to hear about morals or what you feel is right or wrong. Don't clickjack if you feel it is wrong.

universe
Posts: 67
Joined: Mar 20, 2012 12:13 pm

#7 Postby universe » Jun 16, 2012 11:45 pm

It's not about morals, but putting the whole industry into scam. With such dickheads I now understand why no payment provider wants to work with filehosts...
And if you are too stupid to solve a simple .htaccess question, just go ahead and scam with some "nigeria connection" emails and don't troll around!

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#8 Postby Jesse202 » Jun 16, 2012 11:53 pm

Thanks for the comments. It's a free image host first of all. The payment processors not wanting to work with file hosts have nothing to do with clickjacking. Second, it's not a simple .htaccess issue otherwise I could have figured it out or the many who have tried could have. I'm sure you think the obvious way would work, but it doesn't.

If it is easy for you, know not everyone is that advanced in everything. That's why support forums exist. Go on saying it's simple, but I'm sure you couldn't fix it anyway. Simple to say that when you wouldn't offer a solution.

I'm not trolling around. I asked a question. You're the one starting something and putting me down. thanks

nyan
Posts: 163
Joined: Oct 28, 2010 8:01 pm

#9 Postby nyan » Jun 17, 2012 7:17 pm

try putting this after your first
rewritebase /

RewriteRule "backup.php" /404.html [L]
RewriteRule "class.php" /404.html [L]
RewriteRule "database.dat" /404.html [L]

and try moving the index line to
RewriteRule ^$ /cgi-bin/index.cgi [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^users/([0-9A-Za-z\-_]{4,64})/?([0-9]+|$) /cgi-bin/index.cgi?op=user_public&usr_login=$1&fld_id=$2 [L,NC]


I have no idea what the exact problem is your getting and I use nginx so I can't test for you

Jesse202
Posts: 246
Joined: May 07, 2010 6:24 pm

#10 Postby Jesse202 » Jun 18, 2012 6:50 am

Nope :\ still reading the index.cgi first

cyberx
Posts: 1
Joined: Jul 23, 2012 1:13 am

#11 Postby cyberx » Jul 23, 2012 1:40 am

how to adding :

http://domain.com/?id=faq (dynamic)
http://domain.com/faq (will be follow the dynamic)

please help me, thank you