|
|
|
|
|
|
![]() |
#1 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
changing extensions
Hi guys
I am thinking of changing the pages on 1 of my sites from .html to .php for functional purposes. The problem is that I have a lot of link trades on these pages. I am wondering if it would be ok to make these changes as long as I let the people I have linktrades know about the changes so they can fix their links to me, and ofcourse, cancel the trade if they prefer it that way instead. Thanks for Your thoughts |
![]() |
![]() |
![]() |
#2 |
That which does not kill us, will try, try again.
|
Maybe I'm misunderguessing what you're trying to do, but if you just want to have php functions available on pages with html extensions you can do that by adding the one line below to your .htaccess file.
Code:
AddType application/x-httpd-php .html
__________________
"If you're happy and you know it, think again." -- Guru Pitka |
![]() |
![]() |
![]() |
#3 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
so if that line is in my .htaccess file I can do a regular php function on a .html page just as if it were a .php page?
|
![]() |
![]() |
![]() |
#4 |
That which does not kill us, will try, try again.
|
Yes, with that line in your htaccess, you're telling your server to parse html pages looking for executable instructions. The only caveat is that it takes a server a little longer to process each page that way. But not really any longer than if you were using php extensions.
If you have any directories where you don't use PHP on the pages, you can add an htaccess file to those directories to stop the html pages from being parsed to look for php code. Otherwise the one htaccess at your root level will control all directories
__________________
"If you're happy and you know it, think again." -- Guru Pitka |
![]() |
![]() |
![]() |
#5 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
cool, thanks for the help
|
![]() |
![]() |
![]() |
#6 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
I added that line to the .htaccess and tried uploading it with some code I know works on a .php page, but it wont work on my .html page.
Here is the .htaccess file as it looks now: 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] What am I doing wrong? |
![]() |
![]() |
![]() |
#7 |
That which does not kill us, will try, try again.
|
Did you already have the line below in your .htaccess file?
Code:
AddType application/x-httpd-php .php If you added the whole line, you might want to try it with just the ".html" in there, instead of having ".php .html" on that line. I think that worked for me on something once. One other thing, I've seen comments about how if your host is running suPHP you may need to edit that line to remove the "/application/" text from it. Aside from that, I'm not sure why it wouldn't be working for you.
__________________
"If you're happy and you know it, think again." -- Guru Pitka |
![]() |
![]() |
![]() |
#8 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
I added the line, first with .html only, then with .php only, then with both since I read on a board that it was ok to do that, then I saw the thing You said with suPHP also, so I tried that aswell and it still didn't work
![]() the php code still should be in a <?php function ?> right? and should still be able to acces my database and everything when doing that right? |
![]() |
![]() |
![]() |
#9 |
That which does not kill us, will try, try again.
|
Yep, if you have the line of code I posted in your .htaccess file, then you should be able to put your php code in your html files just like you're doing and it should work fine. If there's not some other .htacess file in another place which is affecting things, I'm not sure what else it could be. We may need to wait for someone smarter to wake up.
__________________
"If you're happy and you know it, think again." -- Guru Pitka |
![]() |
![]() |
![]() |
#10 |
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
|
There is someonne smarter than us?! I didn't think that was possible :p
|
![]() |
![]() |
![]() |
|
|