Closed Thread Icon

Topic awaiting preservation: Sig hosting - htaccess file problem Pages that link to <a href="https://ozoneasylum.com/backlink?for=12564" title="Pages that link to Topic awaiting preservation: Sig hosting - htaccess file problem" rel="nofollow" >Topic awaiting preservation: Sig hosting - htaccess file problem\

 
Author Thread
Michael
Maniac (V) Mad Scientist

From: *land
Insane since: Nov 2000

posted posted 12-29-2002 02:02

Okay..
I'm rather uninformed in this portion of the web world..
explaining things on a 1st grade level is needed for me to understand anything coding related...
That said...
here's my problem...
You may be aware of http://formclot.net/sig/ where I have sig hosting for Asylum members.
Now... I've got an htacess file in there that says somethin' like this...

<BLOCKQUOTE><FONT face="Verdana, Arial">code:</font><HR><pre>
AddType php-cgi .php

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?ozoneasylum\.com/.*$ [NC]
RewriteRule \.(gif

Michael
Maniac (V) Mad Scientist

From: *land
Insane since: Nov 2000

posted posted 12-29-2002 02:04

here's the php bits too...

code:
<?php

$path = "";
$max_size = 50000;

if (is_uploaded_file($userfile)) {

if ($userfile_size>$max_size) { echo "<p>as noted above, 50k is the file size limit, <br />come back when you've made a sig that fits that parameter</p>\n"; exit; }

if (($userfile_type=="image/gif") &#0124; &#0124; ($userfile_type=="image/pjpeg")) {

if (file_exists($path . $userfile_name)) { echo "<p>sorry, that file name is currently in use, please input another name</p>\n"; exit; }

$res = copy($userfile, $path . $userfile_name);
if (!$res) {

echo "<p>upload failed!</p>\n"; exit; }

else

echo "<p><b>good to go...</b><br /><br />\n";

echo "file URL:<br />http://formclot.net/sig/$userfile_name</p><br />\n";

} else { echo "<p>file type error! this service provides for jpeg and gif only, under 50K</p>\n"; exit; }

}

?>




FAQs n' Bits: Michael

Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 12-29-2002 04:03

I have a relevant thread here:

http://www.ozoneasylum.com/Forum12/HTML/001095.html

anyways, this is the code that Pugzly gave there.. I haven't tried it, but here it is... Looks the same except for your addtype line at the beginning.

<BLOCKQUOTE><FONT face="Verdana, Arial">code:</font><HR><pre>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com.*$ [NC]
RewriteRule \.(gif

JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 12-29-2002 04:37

Those are exactly the same, except for the escaped(?) dot com on the one and not the other. that AddType is actually to make the upload script run as Michael and is unrelated to the dumb.gif service.

Surely that slash doesn't make all the difference does it? And the fact that the problem is intermittent as opposed to a constant problem, that's super weird. Some boards that call the images get through, others get served up the dumb.gif?!

As you may have guesseed, I have the same problem and am using the same bit of mod_rewrite/htaccess stuff so I'm interested in the answer to this one as well...

Jason

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 12-29-2002 12:43

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 12-29-2002 13:26

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 12-29-2002 13:38

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 12-29-2002 21:17

I inserted the "?" and we'll see how that works. Had a run through my logs and didn't find any from today that were not working. It's quite fun visiting the boards where they have an eye shattering apology.gif posted instead of a sig, people hate that =)

what whig? you'v been drinking again ini? tsk tsk

Jason

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 12-29-2002 21:59

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 12-29-2002 22:26

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Michael
Maniac (V) Mad Scientist

From: *land
Insane since: Nov 2000

posted posted 12-31-2002 23:56

thanks.
seems to be working.


FAQs n' Bits: Michael

« BackwardsOnwards »

Show Forum Drop Down Menu