Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2007-01-03, 04:36 PM   #1
Xallow
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
Join Date: May 2006
Location: Denmark
Posts: 447
Send a message via ICQ to Xallow
.htaccess crap

I have this .htaccess file:

AddType application/x-httpd-php .php .html
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?pornpartyporn\.com [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} ^http://.*$
RewriteRule \.(jpe?g|gif|bmp|png|jpg|mpg|mpeg|wmv)$ http://www.pornlinkworld.com/freesites/hotlink.gif [L]

this line doesn't work:

AddType application/x-httpd-php .php .html

am I missing something?
__________________
Porn Safe Submit Free Sites
Porn Party Porn Submit Free Sites
Xallow is offline   Reply With Quote
Old 2007-01-03, 04:43 PM   #2
RamCharger
Shut up brain, or I'll stab you with a Q-tip!
 
RamCharger's Avatar
 
Join Date: May 2005
Location: Somewhere south of sanity.
Posts: 110
Just a guess, but you're probably causing an error when you're trying to override .html. That extension is probably already defined in the httpd.conf. Now the .php, on the other hand, might be up for grabs (depending on if it's defined in the httpd.conf or not). That's my immediate guess without really seeing or testing anything.
__________________
Adult Pic Web Adult Link Web
RamCharger is offline   Reply With Quote
Old 2007-01-03, 05:01 PM   #3
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
doesn't work meaning what?

pages aren't parsed for php?
web pages all of the sudden pop up save-as boxes?
Error 500 - Internal Server Error pops up?
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2007-01-03, 05:04 PM   #4
Xallow
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
Join Date: May 2006
Location: Denmark
Posts: 447
Send a message via ICQ to Xallow
it still doesn't work if I remove the .html or if I remove the line entirely
__________________
Porn Safe Submit Free Sites
Porn Party Porn Submit Free Sites
Xallow is offline   Reply With Quote
Old 2007-01-03, 05:05 PM   #5
Xallow
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
Join Date: May 2006
Location: Denmark
Posts: 447
Send a message via ICQ to Xallow
Quote:
Originally Posted by cd34 View Post
doesn't work meaning what?

pages aren't parsed for php?
web pages all of the sudden pop up save-as boxes?
Error 500 - Internal Server Error pops up?

pages aren't parsed for php, it just shows the code
__________________
Porn Safe Submit Free Sites
Porn Party Porn Submit Free Sites

Last edited by Xallow; 2007-01-03 at 05:16 PM..
Xallow is offline   Reply With Quote
Old 2007-01-03, 05:17 PM   #6
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
RamCharger:
Xallow is trying to add the html extension as a parsable(?) php script, hence the AddType declaration.

Xallow:
What webhost are you using? You shouldn't need to tell it to declare .php extensions as a PHP script, as that should be done in the httpd.conf when PHP is installed.

I have the following line in my .htaccess:
AddType application/x-httpd-php .html
It succesfully parses all .html folders in the folder (and subfolders) as php.

Try your .htaccess with the same line as mine (i.e. without the '.php')

Another thing to make sure of (I only mention it because I have made the error twice) is that you are uploading the .htaccess as an ASCII file type.

If all the above fails, I'd guess a configuration error at the host.
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.

Last edited by oast; 2007-01-03 at 05:19 PM..
oast is offline   Reply With Quote
Old 2007-01-03, 05:21 PM   #7
Xallow
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
Join Date: May 2006
Location: Denmark
Posts: 447
Send a message via ICQ to Xallow
Another thing to make sure of (I only mention it because I have made the error twice) is that you are uploading the .htaccess as an ASCII file type.

How do You make it so it isn't a ASCII file type?
__________________
Porn Safe Submit Free Sites
Porn Party Porn Submit Free Sites

Last edited by Xallow; 2007-01-03 at 05:26 PM..
Xallow is offline   Reply With Quote
Old 2007-01-03, 05:37 PM   #8
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
Quote:
Originally Posted by Xallow View Post
Another thing to make sure of (I only mention it because I have made the error twice) is that you are uploading the .htaccess as an ASCII file type.

How do You make it so it isn't a ASCII file type?
By setting your FTP program to upload in binary mode
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.
oast is offline   Reply With Quote
Old 2007-01-03, 06:05 PM   #9
Xallow
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
Join Date: May 2006
Location: Denmark
Posts: 447
Send a message via ICQ to Xallow
Ok, I tried it on another server with another host aswell and there it works like a charm, so I have sent the support guys a mail about the issue
__________________
Porn Safe Submit Free Sites
Porn Party Porn Submit Free Sites
Xallow is offline   Reply With Quote
Old 2007-01-04, 10:35 AM   #10
Xallow
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
Join Date: May 2006
Location: Denmark
Posts: 447
Send a message via ICQ to Xallow
well, the host doesn't support that function so i guess that wont be happening
__________________
Porn Safe Submit Free Sites
Porn Party Porn Submit Free Sites
Xallow is offline   Reply With Quote
Old 2007-01-04, 01:47 PM   #11
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
Quote:
Originally Posted by Xallow View Post
well, the host doesn't support that function so i guess that wont be happening
Time for a new host?
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.
oast is offline   Reply With Quote
Old 2007-01-04, 02:19 PM   #12
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
RewriteEngine on
RewriteRule ^whatever.html$ whatever.php [QSA]

not that it a perfect solution, but, it is a workaround
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2007-01-04, 03:27 PM   #13
Xallow
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
Join Date: May 2006
Location: Denmark
Posts: 447
Send a message via ICQ to Xallow
Quote:
Originally Posted by cd34 View Post
RewriteEngine on
RewriteRule ^whatever.html$ whatever.php [QSA]

not that it a perfect solution, but, it is a workaround
How does that work? and the "whatever.html$ whatever.php" I am assuming should be the same page?

Also, I need to do this for a lot of pages, so I put them all in there like that?
__________________
Porn Safe Submit Free Sites
Porn Party Porn Submit Free Sites
Xallow is offline   Reply With Quote
Old 2007-01-04, 03:39 PM   #14
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
You might be able to use something like

RewriteRule ^(.*)\.html$ $1.php [QSA]

but then you would want to also make sure the destination file exists, etc.

I'm not sure why your hosting company won't turn it on for you -- the load generated is exactly the same.

If you can't parse .html pages with php, and you rename all your pages to php so that they can be parsed, there is no difference in terms of cpu horsepower required to serve your site.

The right solution is to just have them turn on php parsing for html pages. I'm not sure what your hosting company's resistance is to doing that.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 04:08 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc