|
2007-01-03, 04:36 PM | #1 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
.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? |
2007-01-03, 04:43 PM | #2 |
Shut up brain, or I'll stab you with a Q-tip!
|
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.
|
2007-01-03, 05:01 PM | #3 |
a.k.a. Sparky
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 |
2007-01-03, 05:04 PM | #4 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
it still doesn't work if I remove the .html or if I remove the line entirely
|
2007-01-03, 05:05 PM | #5 | |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
Quote:
pages aren't parsed for php, it just shows the code Last edited by Xallow; 2007-01-03 at 05:16 PM.. |
|
2007-01-03, 05:17 PM | #6 |
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
|
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.. |
2007-01-03, 05:21 PM | #7 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
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? Last edited by Xallow; 2007-01-03 at 05:26 PM.. |
2007-01-03, 05:37 PM | #8 |
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
|
By setting your FTP program to upload in binary mode
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare. |
2007-01-03, 06:05 PM | #9 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
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
|
2007-01-04, 10:35 AM | #10 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
well, the host doesn't support that function so i guess that wont be happening
|
2007-01-04, 01:47 PM | #11 |
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
|
Time for a new host?
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare. |
2007-01-04, 02:19 PM | #12 |
a.k.a. Sparky
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 |
2007-01-04, 03:27 PM | #13 | |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
Quote:
Also, I need to do this for a lot of pages, so I put them all in there like that? |
|
2007-01-04, 03:39 PM | #14 |
a.k.a. Sparky
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 |
|
|