SunQuest
           Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 15th, 2001, 01:34 PM
vu3prx vu3prx is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: /home
Posts: 10 vu3prx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Using HTACCESS to parse HTML as PHP

Hi,
I want to design a site using PHP. It is heared that Search engines won't index dynamic web pages. My site is hosted in Apache Webserver. So how can i use HTML extension for my php script so that search engines can index the pages thinking of it as normal HTML file.

Can anyone help?

Yujin Boby

Reply With Quote
  #2  
Old September 15th, 2001, 03:55 PM
bumperbox bumperbox is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Tauranga, NZ
Posts: 349 bumperbox User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
in my experience search engines have had no problem indexing php pages

try altavista for example, search for this
url:.php

What they don't like is pages where there is a ?name=value string attached to the url

Reply With Quote
  #3  
Old September 15th, 2001, 09:45 PM
vu3prx vu3prx is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: /home
Posts: 10 vu3prx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Tnx

Tnank you bumperbox for pointing out se hav no pblm with PHP pages. I just heared se won't index dynamic pages, may ones generated from data base.

Thank you for the respons.

Last edited by vu3prx : September 15th, 2001 at 09:47 PM.

Reply With Quote
  #4  
Old September 15th, 2001, 09:56 PM
lectos lectos is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 10 lectos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
As far as I know most indexing engines will index a dynamic site just fine. It follows links from your index page and spiders your entire site. If it's not indexing a certain page, it may not be linked to anything. It indexes my site and all my extensions are PHP. Anyway, here is instructions on doing what you wanted. Just add this to your .htaccess or httpd.conf:

AddType application/x-httpd-php .htm .html

Make sure you take any other AddType and AddHandler out for these extensions that might interfere.

Reply With Quote
  #5  
Old September 16th, 2001, 10:31 AM
vu3prx vu3prx is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: /home
Posts: 10 vu3prx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It Fails to work

Hi lectos,

Tnanks for your suggestions. Nice to know search engines have no pblm with php pages. I have three sites done using php and i was worried abt this as i designed some of the sites to get listed in SE.

I don't have access to httpd.conf and i can use .htaccess. I tryed .htaccess with

AddType application/x-httpd-php .html

But i am getting server error. So i delete the .htaccess file. I can't see the .htaccess file in cute ftp. So i need to login using ftp.exe (command line) inorder to delete .htaccess

Is it require any more change in .htaccess


Thanks,

Boby

Reply With Quote
  #6  
Old September 16th, 2001, 10:52 AM
lectos lectos is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 10 lectos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
.htaccess is a hidden file. You have to set cuteftp to show remote hidden files or make it send a "-la" with the directory list commands. It's an option somewhere. It's probably conflicting with another command in the httpd.conf. I wouldn't worry about it and just name all your files .php or whatever like usual.

Reply With Quote
  #7  
Old September 16th, 2001, 01:46 PM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I do not understand why you want to force html files parsing as php.
I think that you can use the php extensions for parsing those kind of files only.
In the future you could have the needs to create some html pages that do not contain php code.
Doing so (adding the AddType), your web server will parse the html file, wasting time for nothing.
Why consume time for adding that kind of directive?
As said by other people no problems with SE, so why add this directive?
Maybe you have special reasons for changing .php to .html
that I do not know (mybe for compatibility with older site versions?).

If I were you I would not put any AddType directive into your .htaccess file,
but simple I will publish my pages with php extension.

As a suggestion,
SE could prefer to see
/articles/15/
instead of
/articles.php?id=15
and this could be done with Apache into .htaccess
(There some limitations and notes about the use,
If interested about the argument do a search for "internal redirection" and/or "mod_rewrite" module in this forum or consult apache docs for more infos)


Just my point of view.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Using HTACCESS to parse HTML as PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway