Re: redirect / new website how to redirect old (google) links to new site ?



..oO(Jerry Stuckle)

Michael Fesser wrote:

Also, I have some customers with .php pages which really are static.
But why use PHP for some other function such as processing form data.

There are many more nice things I use PHP for, even if the output may be
static (for a while). If I can use a tool and get some benefits from it,
I use it.

Also, he never said *all* his pages were static. Telling the web server
to process *all* .html files as php files is an unnecessary overhead.

Who cares? That's what a server is for. You won't be able to notice a
difference in time between a plain HTML file delivered as-is and another
HTML file, parsed by PHP. Even with PHP-(Fast)CGI the difference is too
small. The transfer over the network takes much more time.

And BTW: Unnecessary 301 redirects are no overhead? Not much for the
server, but for all the clients and the network.

But of course you can also use SSI if you like - just configure the
server to parse .html files for SSI directives. And if you want to use
it all at the same time, you can do that as well:

http://example.com/static.html
http://example.com/phpscript.html
http://example.com/perlscript.html
http://example.com/ssi.html

It just depends on the server configuration (in this case for example
with content negotiation and MultiViews).

Yep, and the more you tell the server it has to parse, the more CPU time
it takes.

That's his job.

That's a broken design. There are many valid reasons to keep all such
technical stuff out of URLs.

Not at all. No "technical stuff" in the url at all. You're just
redirecting index.html to actually retrieve index.php instead.

A 'php' in the URL is technical stuff that doesn't belong there. A URL
describes a resource, not details about the way it is generated.

No extension?

Exactly. Reliable, long-living (in other words: "cool") URLs don't need
an extension, simply because it avoids a lot of problems.

UGH - no, DOUBLE UGH! Vomit! Wash your mouth out with soap!

Extensions were created for a purpose - to let the server know what
needs to be handled by which processors.

Concepts like "directory", "file", "extension" don't exist in URLs.
A URL doesn't describe a file, but a resource.

You only need an extension if you directly map a URL onto the server's
filesystem. That's the most common, but not the only way. Of course on
the server the files still have their extension, but there's no need to
show it in a URL.

To bypass that creates a
completely unnecessary load on the server.

If your server gets into trouble because of some little lookups and
simple pattern matching then you have a _real_ problem.

You should care more about your clients (users, search engines) than
about the server and make things as easy as possible for them. Using the
right tools at the right time to satisfy the clients, that's the whole
point. Ignoring these tools just because they may cause some more CPU
load now and then is - sorry - stupid (no offense intended).

Micha
.



Relevant Pages

  • Re: How do I create multiple text boxes with the same info that will
    ... Use Server Side Includes (SSI) ... Your server will need to be configured to use SSI and you may need to ... your pages with an .shtml extension. ... Use PHP Includes ...
    (microsoft.public.publisher.webdesign)
  • Re: redirect / new website how to redirect old (google) links to new site ?
    ... But why use PHP for some other function such as processing form data. ... to process *all* .html files as php files is an unnecessary overhead. ... Your hosting company, for one, unless you're on a dedicated server. ... The extension just allows the server to do the most efficient processing of the file. ...
    (comp.lang.php)
  • Re: Need advice on SSI exec cmd and php files
    ... As this adds extra burden on the server I have it disabled by ... Whether SSI is really /needed/ depends on the content, ... only work if PHP was installed as a cgi. ... see that it's something else than html files. ...
    (comp.infosystems.www.servers.unix)
  • Re: Multiple Domains; 1 Server; 1 PHP Install; Only One Domain Has A Working PHP; WHY??????
    ... application/x-httpd-php .php is outside of all virtual hosts. ... With IIS 6 (2003 Server), open up the IIS Manager, go to Web Service ... Extensions, choose "Add a new Web service extension", enter in a name ... to setting DirectoryIndex with Apache. ...
    (comp.lang.php)
  • Re: Change included code
    ... Index.php is basically an html file uses a linked css file and when its included in the new file its referencing a css file in the wrong spot. ... It would actually be a bit more trouble since any time I want to upload to the server to test I will have to change the link. ... Would be easier just to have php just add "../" to one spot instead manually doing it every time I upload to the server. ... My server uses public_html to hold html files while my computer doesn't. ...
    (comp.lang.php)