Sorry guys, stupid question....
Am no programming expert and have only just started using php for
creating dynamic news pages.
Then I see a dynamic website without the php extension. http://www.newcarnet.com/Alfa%20Romeo_news.html?id=8380
It has the html extension that loads the required page dynamically.
I thought html pages could not be dynamic. How is this done??
Thanks
Alec 9 1609
Michael thanks for the reply...
So I should stick to standard php then... Thats suits me :-)
By the way, what advantage can be gained by using this other
method???
Cheers
Alec
On Fri, 22 Aug 2008 08:11:35 -0700, Alec wrote:
Michael thanks for the reply...
So I should stick to standard php then... Thats suits me :-)
Google "clean urls" if you want more control over what's in the address
bar.
By the way, what advantage can be gained by using this other method???
The only advantage is facilitating laziness. You can set up a webserver to
process any file extension through any server-side process but that means
all files are being run through the processor instead of just the files
that have scripting language in them. It's drastically increasing server
load unnecessarily.
--
I told you this was going to happen.
..oO(Michael Vilain)
>In article <3c*********** *************** ********@k13g20 00hse.googlegro ups.com>,
Alec <aj****@aol.com wrote:
>Sorry guys, stupid question....
Am no programming expert and have only just started using php for creating dynamic news pages.
Then I see a dynamic website without the php extension.
http://www.newcarnet.com/Alfa%20Romeo_news.html?id=8380
It has the html extension that loads the required page dynamically.
I thought html pages could not be dynamic. How is this done??
Thanks
Alec
It's a very painful modification and expensive (to performance) of their web server to always process html files as dynamic pages.
That's a wrong assumption, since you don't know anything about their
server. If for example PHP is used on every page (which it usually is
on every bigger site), then there's nothing wrong with this approach.
Additionally you don't know how the server maps the URLs to the actual
files or scripts. The .html could be there just for cosmetic reasons,
while still allowing for /foo.html being served directly and /bar.html
processed by PHP. Quite easy to do on Apache servers.
>Instead of interpeting the pages as plain old "ship it to the remote browser and don't do anything else" HTML code they modified their web server to always invoke the php or perl parser.
Could be, but you would have to ask them if that's indeed the case. You
can't tell that from just looking at the URLs.
>It can be done, but it's a Massively Bad Idea(tm) to bork on your web server that way.
As said - it depends.
>If they have the processing capacity, great. But I'll bet if they handle high-volume throughput, they'll soon discover that stupid is a stupid does.
I doubt that.
Micha
..oO(Alec)
>Am no programming expert and have only just started using php for creating dynamic news pages.
Then I see a dynamic website without the php extension.
http://www.newcarnet.com/Alfa%20Romeo_news.html?id=8380
It has the html extension that loads the required page dynamically.
I thought html pages could not be dynamic. How is this done??
A URL and a file on disk are two completely different things. In fact a
URL is just a string, things like 'directory' or 'file extension' don't
have any meaning there. The .html above is just a 5-char string without
any meaning.
It depends on the server how to map those URLs onto the files or scripts
on the disk. Usually this mapping is done directly from the URL to the
file system, but there are also various ways for URL rewriting. There
doesn't even have to be a file called "Alfa Romeo_news.html ", it could
all be just a single script for example. From just looking at a URL you
can't tell anything about what's going on behind the scenes or how the
pages are created. It can even happen all at the same time, e.g. http://example.com/foo.html -static page http://example.com/bar.html -PHP script http://example.com/abc.html -SSI page http://example.com/xyz.html -a JPEG image
Micha
Alec wrote:
Sorry guys, stupid question....
Am no programming expert and have only just started using php for
creating dynamic news pages.
Then I see a dynamic website without the php extension.
http://www.newcarnet.com/Alfa%20Romeo_news.html?id=8380
It has the html extension that loads the required page dynamically.
I thought html pages could not be dynamic. How is this done??
Thanks
Alec
A simple remapping in .htaccess will do it. Or there could be an SSI
include in the .html file for the .php file. Or other ways.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
Jerry Stuckle wrote:
Alec wrote:
>Sorry guys, stupid question....
Am no programming expert and have only just started using php for creating dynamic news pages.
Then I see a dynamic website without the php extension.
http://www.newcarnet.com/Alfa%20Romeo_news.html?id=8380
It has the html extension that loads the required page dynamically.
I thought html pages could not be dynamic. How is this done??
Thanks
Alec
A simple remapping in .htaccess will do it. Or there could be an SSI
include in the .html file for the .php file. Or other ways.
As Jerry said you can tell the server to process a page with the PHP
Engine using any extension you want.
for example in your .htaccess file: (apache)
AddType application/x-httpd-php .htm .html
will process .htm, html to the PHP engine.
AddType application/x-httpd-php .foo
will allow pages with .foo extensions the same.
One thought for this is to hide the php extension to throw off some
hackers, not sure how effective it is, but I suppose every little bit
helps, especially if they are scanning for php extension automatically.
FutureShock wrote:
Jerry Stuckle wrote:
>Alec wrote:
>>Sorry guys, stupid question....
Am no programming expert and have only just started using php for creating dynamic news pages.
Then I see a dynamic website without the php extension.
http://www.newcarnet.com/Alfa%20Romeo_news.html?id=8380
It has the html extension that loads the required page dynamically.
I thought html pages could not be dynamic. How is this done??
Thanks
Alec A simple remapping in .htaccess will do it. Or there could be an SSI include in the .html file for the .php file. Or other ways.
As Jerry said you can tell the server to process a page with the PHP
Engine using any extension you want.
for example in your .htaccess file: (apache)
AddType application/x-httpd-php .htm .html
will process .htm, html to the PHP engine.
AddType application/x-httpd-php .foo
will allow pages with .foo extensions the same.
One thought for this is to hide the php extension to throw off some
hackers, not sure how effective it is, but I suppose every little bit
helps, especially if they are scanning for php extension automatically.
Even easier - just rewrite all applicable .html extensions to .php ones.
No need to parse .html files for php code that way.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
FutureShock wrote:
Jerry Stuckle wrote:
>Alec wrote:
>>Sorry guys, stupid question....
Am no programming expert and have only just started using php for creating dynamic news pages.
Then I see a dynamic website without the php extension.
http://www.newcarnet.com/Alfa%20Romeo_news.html?id=8380
It has the html extension that loads the required page dynamically.
I thought html pages could not be dynamic. How is this done??
Thanks
Alec A simple remapping in .htaccess will do it. Or there could be an SSI include in the .html file for the .php file. Or other ways.
As Jerry said you can tell the server to process a page with the PHP
Engine using any extension you want.
for example in your .htaccess file: (apache)
AddType application/x-httpd-php .htm .html
will process .htm, html to the PHP engine.
AddType application/x-httpd-php .foo
will allow pages with .foo extensions the same.
One thought for this is to hide the php extension to throw off some
hackers, not sure how effective it is, but I suppose every little bit
helps, especially if they are scanning for php extension automatically.
It won't help. You also need to disable the advertising of php in the
php.ini file, for instance. But most servers have php installed anyway,
so hackers will check for it.
But if you follow good security practices in your code and server
configuration, it shouldn't be a problem.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
Jerry Stuckle wrote:
FutureShock wrote:
>Jerry Stuckle wrote:
>>Alec wrote: Sorry guys, stupid question....
Am no programming expert and have only just started using php for creating dynamic news pages.
Then I see a dynamic website without the php extension.
http://www.newcarnet.com/Alfa%20Romeo_news.html?id=8380
It has the html extension that loads the required page dynamically.
I thought html pages could not be dynamic. How is this done??
Thanks
Alec
A simple remapping in .htaccess will do it. Or there could be an SSI include in the .html file for the .php file. Or other ways.
As Jerry said you can tell the server to process a page with the PHP Engine using any extension you want.
for example in your .htaccess file: (apache) AddType application/x-httpd-php .htm .html
will process .htm, html to the PHP engine.
AddType application/x-httpd-php .foo
will allow pages with .foo extensions the same.
One thought for this is to hide the php extension to throw off some hackers, not sure how effective it is, but I suppose every little bit helps, especially if they are scanning for php extension automatically.
It won't help. You also need to disable the advertising of php in the
php.ini file, for instance. But most servers have php installed anyway,
so hackers will check for it.
But if you follow good security practices in your code and server
configuration, it shouldn't be a problem.
That is why stated as to how effective it was. I am not questioning the
validity of it, just how simple it would be if you so choose to alter
the extension. The statement about why it would be done, I had read off
a site. Probably a well know site. http://www.php.net/manual/en/security.hiding.php
I personally use the php extension.
Scotty This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: C. Armour |
last post by:
Help me, I'm suffering!
Situation: I have a load() function which loads a bunch
of TextFields with values. There are TextListeners
registered for each of these TextFields. Thus, changing the
text in any of them fires off a TextEvent, even if done
programmatically (by means of setText()).
The problem: I need all the various TextEvents fired off
during the load operation (as a result of using TextField.setText())
|
by: Randall Smith |
last post by:
I've been programming in Python for about 2 years. I think it offers
the best combination of simplicity and power of any language I have
explored. As I write more and larger and complex programs, I need to
code better. By better I mean clearer, cleaner, more efficient and
maintainable. As the subject states, I want to become a really good
Python programmer. I learn most everything from random examples and
experience and that's good,...
|
by: Lampa Dario |
last post by:
Hi, where is this stupid error in this program? When I execute it, i
receive a segmentation fault error.
#include <stdio.h>
int main(int argc, char *argv, char *env) { int i=0; int l=0;
int word=0;
char *querystring;
querystring=malloc(sizeof(char)*100000);
if (getenv("QUERY_STRING")==NULL)
|
by: Alan Silver |
last post by:
Hello,
This is NOT a troll, it's a genuine question. Please read right
through to see why.
I have been using Vusual Basic and Classic ASP for some years, and
have now started looking at ASP.NET. At first glance, it looks
excellent, albeit nothing that couldn't have been done to Classic ASP.
I have been through a few tutorials and was impressed with how quickly
you can get database info onto a page.
|
by: Guoqi Zheng |
last post by:
I think I have this kind of problem very often, now it is really making me
crazy. VS.NET always want to change my html code. Ok, that is fine as long
as Vs.Net can ask my confirmaton first.
For example, I have below in header part of my html page.
<base href="http://localhost/more/">
When I click save, VS.NET change it back to <base
href="http://localhost/more"> automatically without asking me or anything.
It just remove the last "/" by...
| |
by: sparks |
last post by:
We get more and more data done in excel and then they want it imported
into access.
The data is just stupid....values of 1 to 5 we get a lot of 0's ok
that alright but 1-jan ?
we get colums that are formatted for number and then half way down
they are changed to text.
OR the famous ok now everything in red is ---- and everything in blue
is---------. WTF are these people thinking?
|
by: Stan R. |
last post by:
Hi. I'm an old programmer whose been finally reading up on xml the past
week. The concepts of xml, dtd, and xsl seem pretty straight forward to
me. I understand that xsl (as xslt for transformations) can be used to
transform xml data from an xml document into another document, as
specified in the templates.
One of the best examples I've seen by far is transforming a given xml
doc into html.
But where I seem to be getting stuck in the...
|
by: tasteless |
last post by:
Hi guys,
I need really hard questions (about 10) about PHP programming (some of
elements OOP as well, but no MySQL questions - this is different part),
this questions needs to be very hard, but the experienced senior PHP
developer should answered on it.
I've already searched in google and google groups archive but without
any good results. So could anybody help me giving some link or sending
some stuff to me ?
|
by: raylopez99 |
last post by:
I ran afoul of this Compiler error CS1612 recently, when trying to
modify a Point, which I had made have a property. It's pointless to
do this (initially it will compile, but you'll run into problems
later). Apparently Point is a struct, a value type, and it does not
behave like a classic structure (in my mind's eye, and see below).
Traditionally I think of a classic structure as simply an object where
every member is public. But with...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |