Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Parsing .html Pages
moldboy
post Jul 8 2005, 02:37 AM
Post #1


Privileged Member
*********

Group: Members
Posts: 518
Joined: 29-April 05
From: Canada Eh?!?
Member No.: 6,408



This isn't really that urgent but I was wondering, I read somewhere that you can configure you server to pars all html pages for php code, and I was wondering if that was true, and if trap17 has that feature enabled?
Go to the top of the page
 
+Quote Post
truefusion
post Jul 8 2005, 03:22 AM
Post #2


Ephesians 6:10-17
Group Icon

Group: [MODERATOR]
Posts: 1,916
Joined: 22-June 05
From: The World of Gentoo
Member No.: 8,528



Yes, it's true. I did it to my account, just incase i wanted an HTML document to translate php coding. Go to mime types from your cpanel and add a mime type: application/x-httpd-php : .html
Go to the top of the page
 
+Quote Post
moldboy
post Jul 8 2005, 03:27 AM
Post #3


Privileged Member
*********

Group: Members
Posts: 518
Joined: 29-April 05
From: Canada Eh?!?
Member No.: 6,408



Thanks! Just one more thing, if I were to ever want to do one of those complex thing in the address, you know, index.php?link=food, or something, would that still work with an html page (index.html?link=food)?
Go to the top of the page
 
+Quote Post
Hamtaro
post Jul 8 2005, 04:06 AM
Post #4


Super Member
*********

Group: Members
Posts: 372
Joined: 14-October 04
Member No.: 1,736



Yes it would, since the page is being parsed as a PHP script. Anything that was done using .php would work exactly the same way as it would set as .html.
Go to the top of the page
 
+Quote Post
jmb2006
post Jul 8 2005, 12:03 PM
Post #5


Member [Level 3]
******

Group: Members
Posts: 96
Joined: 7-July 05
Member No.: 9,135



now that were on this topic, how would you parse filenames with no extensions as php files, e.g.

http://www.some-site.com/index?content=blah

for security.
Go to the top of the page
 
+Quote Post
truefusion
post Jul 8 2005, 01:12 PM
Post #6


Ephesians 6:10-17
Group Icon

Group: [MODERATOR]
Posts: 1,916
Joined: 22-June 05
From: The World of Gentoo
Member No.: 8,528



QUOTE(james_666 @ Jul 8 2005, 08:03 AM)
now that were on this topic, how would you parse filenames with no extensions as php files, e.g.

http://www.some-site.com/index?content=blah

for security.

I've read this somewhere, i think it was another feature you get for making html pages read php coding. But, i cant remember. I'll reply later when i get the full info on that..
Go to the top of the page
 
+Quote Post
HmmZ
post Jul 8 2005, 01:16 PM
Post #7


Super Member
*********

Group: Members
Posts: 362
Joined: 2-March 05
From: The Netherlands
Member No.: 4,097



james 666
thats function based PHP, you can google, but if you want a full explanation from me or some php guru(Hiya SystemofWisdom tongue.gif ) on the forums, tell me smile.gif
Go to the top of the page
 
+Quote Post
truefusion
post Jul 8 2005, 03:54 PM
Post #8


Ephesians 6:10-17
Group Icon

Group: [MODERATOR]
Posts: 1,916
Joined: 22-June 05
From: The World of Gentoo
Member No.: 8,528



QUOTE(james_666 @ Jul 8 2005, 08:03 AM)
now that were on this topic, how would you parse filenames with no extensions as php files, e.g.

http://www.some-site.com/index?content=blah

for security.

I've found something similar to what you're asking for. I dont know if it will help you, but it's a start.

http://www.invano.com/?php:invanonavigation
Go to the top of the page
 
+Quote Post
Hamtaro
post Jul 8 2005, 09:37 PM
Post #9


Super Member
*********

Group: Members
Posts: 372
Joined: 14-October 04
Member No.: 1,736



If that's not what you're looking for, then try this:
You would have to add this to .htaccess (The PHP Manual says httpd.conf, but it should work in .htaccess):

CODE
<Location /index>
   ForceType application/x-httpd-php
</Location>


That would make it run as a PHP script. Also, if you want that to be the index, you would also have to add this to .htaccess
CODE
DirectoryIndex index


I hope that helped you. I don't quite know that much about this, though.
Go to the top of the page
 
+Quote Post
sachavdk
post Jul 15