Jump to content


Photo

changing .php to .html without htaccess


  • Please log in to reply
2 replies to this topic

#1 horsetags

horsetags
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 19 August 2006 - 08:08 PM

Hi
I am using the htaccess method with a rewrite rule -
RewriteRule ^(.+)\.htm$ $1.php?%{QUERY_STRING}
RewriteRule ^(.+)\.html$ $1.php?%{QUERY_STRING} [NC]


at the moment, but saw somewhere a quote of a way that is supposedly better, but cannot get any info on it, searching the net.

This is the bit of text someone sent me in an email, but then didn't explain themselves (it's a long story)

just use an application statement and push all .html through the php engine then .html files work in php


If anyone can point me to a place where i can read up about it (i'm no php programmer though, but i am learning to understand scripts, so can follow a tutorial pretty well)

Thanks

Paul


#2 ShogunWarrior

ShogunWarrior
  • Members
  • PipPipPip
  • Advanced Member
  • 528 posts
  • LocationIreland

Posted 19 August 2006 - 08:58 PM

In a .htacces file:
AddType application/x-httpd-php .html .htm

<a href="http://www.daviddora...nmedia.com/">My New Site/Blog</a> | <a href="http://www.daviddora...m/check/">Check your page for broken links/images/scripts</a>

Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd

#3 horsetags

horsetags
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 19 August 2006 - 09:13 PM

Thanks,

i will read up about it (and use it!) now i know what it is.

So much i don't know..............

Thanks again




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users