Welcome Guest ( Log In | Register )


Why register for free on WebRadiance?
Welcome to WebRadiance forums! WebRadiance is a place for discussion and help on a large range of web design and development related topics such as HTML, CSS, ASP & .NET, PHP and SEO. It is provided for free, without ads and is a friendly place for beginners and professionals alike. By joining us today you can take part in our rapidly growing community.

Registering enables you to:
  • have your say by posting new messages and taking part in topics and polls
  • keep up to date with the latest news and trends in the web design and development world
  • send private messages to other members
  • have your questions answered by our knowledgeable community
  • add a link to your website in our links area
  • receive emails when someone replies to your posts

Simple PHP preparation

Or how to switch to php from html?

 
Reply to this topicStart new topic
> Simple PHP preparation, Or how to switch to php from html?
clubdesign
post Nov 2 2008, 07:23 PM
Post #1


W.R. Private
Group Icon

Group: Members
Posts: 24
Joined: 10-October 08
From: Barnet EN4, London
Member No.: 1,240



Hi all.

I want to prepare my site to handle forms and a search bar. The site is almost finished and all .html pages. I intend to add simple search functionality at some point after finishing.

Whilst I'm not there yet, I note that the pages need to be .php extended for stuff like search to work.

Can you offer any tips for this? Is it simply a case of going through the whole site in Explorer or Dreamweaver renaming files (from index.html to index.php etc...) and 'Bam', it's a .PHP site ready for Search; or is there more to it - or even an easier and quicker way?

Of course, I intend to follow any procedure for this before starting on the .htaccess file.

Many thanks in advance smile.gif
Go to the top of the page
 
+Quote Post
sypher
post Nov 2 2008, 08:41 PM
Post #2


the owner3r
Group Icon

Group: Administrators
Posts: 1,531
Joined: 4-April 06
From: North Wales, UK
Member No.: 4



Its possible to use htaccess to handle any html files as php.

I'll post the code shortly.


--------------------
sypher design - North Wales Web Design | Latest Work: - Celtic DEA

CSS - Cant See Sh*t
Go to the top of the page
 
+Quote Post
sypher
post Nov 5 2008, 12:46 AM
Post #3


the owner3r
Group Icon

Group: Administrators
Posts: 1,531
Joined: 4-April 06
From: North Wales, UK
Member No.: 4



Okay heres the code. By using the AddType function of htaccess your able to assign applications or languages to different extensions.

CODE
Addtype application/xhtml+xml .xhtml
Addtype x-mapp-php4 .html .htm .xhtml


If your server is using php5 then change it to 5 instead.


--------------------
sypher design - North Wales Web Design | Latest Work: - Celtic DEA

CSS - Cant See Sh*t
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
Tags
No Tag inserted yet

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version Time is now: 8th January 2009 - 07:45 AM
Contact Us
Web Design Forum | Web Development Forum | Web Help | WordPress Help