Re: [PHP-DB] Renaming all pages to .php
Hi David Comments inline... On Thu,Jun 19, 2003 at 08:31:40PM -0700, David Blomstrom wrote : At 09:16 PM 6/19/2003 -0500, Joshua Stein wrote: snip I don't know exactly what you mean, but I just renamed one of my pages (using Dreamweaver) with a .php extension, previewed it in Mozilla, and it worked fine. This is the address displayed in the browser: file:///C:/sites/geosymbols/birds.php However, when I pasted the URL into Internet Explorer. So I linked to the page from page X, previewed page X in IE and clicked the link and was taken to C:\sites\geosymbols\waldman.php That's weird. I never even realized my two browsers displayed localhost links differently - file:///c versus C:, and forward slashes versus back slashes. But I assume that means my server is set up properly. As long as I can preview my pages, I can't complain! * * * * * * * * * * /snip This doesn't mean your server is set up correctly. The file:// scheme or the c:\... means that the browser is reading the file directly from the hard disk. The page is not being served by your web server (which I assume you have setup on your local machine). When the browser reads a file from the hard drive, it will display the contents (if it can), parsing out and rendering HTML as it goes. For example, create a file with a php extension with the following contents:- ?php phpinfo(); ? H1This bit is html/H1 Save this in your webroot. Here we have a page that has both html and php in it. If you view this using the file:// or c:\ methods (as used by dreamweaver's preview by default) you will see the H1 rendered and none of the php code, but the php code will not have executed. Compare that with browsing via http://localhost/mytest.php. You'll find that the php has executed and you have the html rendered out below. When testing pages locally the best way to do it is to have a browser open and explicitly browse to http://localhost/dirname/pagename.php /snip Alright, it sounds like a go. Thanks for all the tips. snip I think you'll find that having every page in a separate folder will create an internal link nightmare. I would be inclined to structure your site in a more standard way and use Apache's rewrite module to create the http://site.com/dirname/ style urls you are talking about. You could also use the rewrite module to allow people to request a page with an htm extension, which is translated into, eg: a page with a php extension, a query string passed to a specfic php page, etc. That way you keep search engines and bookmarkers happy but retain your development freedom. It effectively inserts a configurable layer between the browser and the server where you can manage the type and appearance of urls that apply to the site. ISAPI url rewrite filters are available for IIS if that's your server flavour. Hope this helps. Ronan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Renaming all pages to .php
Hi David Am Freitag, 20. Juni 2003 04:13 schrieb David Blomstrom: I joined this list a few weeks ago because I wanted to learn about php. Unfortunately, I still haven't found time to study it in any depth. Thus, my question might be a bit amateurish, but it's fairly urgent, so I'd appreciate any feedback anyone cares to offer. I'm working on a new website that I need to get online by the end of this month. I had wanted to do some stuff with php on it, but there's no way I can learn php and apply it before the July 1 deadline. No problem - I'll just add the php later. The catch is that my pages will be registered in search engines with URLs ending in .htm, something I'll have to address when I switch to php. Then I saw a discussion on another forum about a guy who was planning on changing all the .htm extensions on his webpages to .php, whether those pages use php or not. The general consensus was that that the pages would work just fine even without php, and they'd be all set up if and when he got around to adding php. I'd like to get some feedback from this forum. Do you agree that a page without php functions or server side includes can be put online with either a .htm or .php function? If I never add a php function to a page with a .php extension, could that cause some kind of problems? This will run, and I think almost without problems. But IMHO it makes no sense. And I don't know, if all the searchengines out there will be able or willing to read *.php files (google works fine). You should know that renaming all that files is not all, you have to do. you have also to change every single link in your pages, that points to your pages. I don't know how large your project is, but it can be much work, and if you do not add lines of PHP-Code to that pages, you can save much time by not doing so. But if you are coding new pages, and you are planning to add dynamic contents by using PHP-Code, than IMHO it will be a good decision to use *.php file-extensions, because you can save that time later. Also, I'm thinking of naming all my pages index and sticking them inside folders. That way, visitors can reach a page by typing in www.geobop.com/birds/ , whether the full URL is www.geobop.com/birds/index.htm or www.geobop.com/birds/index.php Is this a good plan, or do you see any problems? Surely there will be no problem, but see above. CU Thorsten BTW. It is not a good idea to start a new thread by replying to an old one. -- Thorsten Körner http://www.123tkShop.org -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Renaming all pages to .php
At 02:19 PM 6/20/2003 +0200, Thorsten Körner wrote: This will run, and I think almost without problems. But IMHO it makes no sense. And I don't know, if all the searchengines out there will be able or willing to read *.php files (google works fine). Are you saying that some search engines might not register pages with php extensions? That would be a MAJOR problem. You should know that renaming all that files is not all, you have to do. you have also to change every single link in your pages, that points to your pages. I don't know how large your project is, but it can be much work, and if you do not add lines of PHP-Code to that pages, you can save much time by not doing so. Hm... it would be nice if I could use a search and replace function, but that would be tricky. If I replaced every instance of .htm with .php, then that would also change links to other websites. For example... a href=htttp://www.50states.com/history.htm would become a href=http://www.50states.com/history.php; I wonder if there's an advanced search and replace technique that would target only internal links on my website. On the other hand, I am doing an extensive overhaul that will require recoding on every single page, so maybe I could just manually change the links as well. Thanks for the tips. The comment about the search engines is especially interesting (or alarming). I'll have to give this some more thought if .php links might affect my site's visibility in search engines. Do you know if the same applies to .asp and ColdFusion? BTW. It is not a good idea to start a new thread by replying to an old one. I wasn't aware that I did. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Renaming all pages to .php
I've heard of a Apache server setting or update that makes for example: .com/shoes.html returns page /index.php?site=shoes or .com/shoes.html returns page /shoes.php Just like you have virtual folders you can have wildcard serach and replaced virtual file names. I believe this would solve your problem below and knowing this would make my PHP driven site appear to be a collection of html pages. Does anyone know how to do this or what it is called so I can research it? -Steve --- David Blomstrom [EMAIL PROTECTED] wrote: At 02:19 PM 6/20/2003 +0200, Thorsten Körner wrote: This will run, and I think almost without problems. But IMHO it makes no sense. And I don't know, if all the searchengines out there will be able or willing to read *.php files (google works fine). Are you saying that some search engines might not register pages with php extensions? That would be a MAJOR problem. You should know that renaming all that files is not all, you have to do. you have also to change every single link in your pages, that points to your pages. I don't know how large your project is, but it can be much work, and if you do not add lines of PHP-Code to that pages, you can save much time by not doing so. Hm... it would be nice if I could use a search and replace function, but that would be tricky. If I replaced every instance of .htm with .php, then that would also change links to other websites. For example... a href=htttp://www.50states.com/history.htm would become a href=http://www.50states.com/history.php; I wonder if there's an advanced search and replace technique that would target only internal links on my website. On the other hand, I am doing an extensive overhaul that will require recoding on every single page, so maybe I could just manually change the links as well. Thanks for the tips. The comment about the search engines is especially interesting (or alarming). I'll have to give this some more thought if .php links might affect my site's visibility in search engines. Do you know if the same applies to .asp and ColdFusion? BTW. It is not a good idea to start a new thread by replying to an old one. I wasn't aware that I did. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Renaming all pages to .php
Hi Steve Comments inline... On 20 Jun,2003 at 10:06 Steve B. wrote: snip I've heard of a Apache server setting or update that makes for example: .com/shoes.html returns page /index.php?site=shoes or .com/shoes.html returns page /shoes.php /snip See my previous post on this thread ... the module you want is mod_rewrite. If you're a dab hand with regexps you shouldn't have any trouble with it !?!?! ;-) Ronan e: [EMAIL PROTECTED] t: 01903 739 997 w: www.thelittledot.com The Little Dot is a partnership of Ronan Chilvers and Giles Webberley -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Renaming all pages to .php
I joined this list a few weeks ago because I wanted to learn about php. Unfortunately, I still haven't found time to study it in any depth. Thus, my question might be a bit amateurish, but it's fairly urgent, so I'd appreciate any feedback anyone cares to offer. I'm working on a new website that I need to get online by the end of this month. I had wanted to do some stuff with php on it, but there's no way I can learn php and apply it before the July 1 deadline. No problem - I'll just add the php later. The catch is that my pages will be registered in search engines with URLs ending in .htm, something I'll have to address when I switch to php. Then I saw a discussion on another forum about a guy who was planning on changing all the .htm extensions on his webpages to .php, whether those pages use php or not. The general consensus was that that the pages would work just fine even without php, and they'd be all set up if and when he got around to adding php. I'd like to get some feedback from this forum. Do you agree that a page without php functions or server side includes can be put online with either a .htm or .php function? If I never add a php function to a page with a .php extension, could that cause some kind of problems? Also, I'm thinking of naming all my pages index and sticking them inside folders. That way, visitors can reach a page by typing in www.geobop.com/birds/ , whether the full URL is www.geobop.com/birds/index.htm or www.geobop.com/birds/index.php Is this a good plan, or do you see any problems? Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Renaming all pages to .php
I'd like to get some feedback from this forum. Do you agree that a page without php functions or server side includes can be put online with either a .htm or .php function? If I never add a php function to a page with a .php extension, could that cause some kind of problems? it won't cause any problems. you'll have the very small overhead of having to run every static page through php's parser, but if you're going to have php in these pages in the future it doesn't really matter. Also, I'm thinking of naming all my pages index and sticking them inside folders. That way, visitors can reach a page by typing in www.geobop.com/birds/ , whether the full URL is www.geobop.com/birds/index.htm or www.geobop.com/birds/index.php Is this a good plan, or do you see any problems? again, no problems. just make sure your web server is setup to search for index.php as a directory index page. -j. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Renaming all pages to .php
You can easily add the .php extension to any .htm(l) page that you have with no worries as long as you have PHP installed and configured properly. The only problem is that page load will be SLIGHTLY slower since PHP will search all .php pages for PHP code to evaluate. Upon finding none, it will simply return the HTML to the requester. But note that this is a tiny bit longer than your web server just serving the page without passing it through PHP. Naming all files index.XXX will be a good idea. Though realize that some people might link directly to the file itself (which can sometimes become visible with different browsers and different activities). But none-the-less, it will work for most users if they do decide to bookmark the folder. -M -Original Message- From: David Blomstrom [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 10:14 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Renaming all pages to .php I'd like to get some feedback from this forum. Do you agree that a page without php functions or server side includes can be put online with either a .htm or .php function? If I never add a php function to a page with a .php extension, could that cause some kind of problems? Also, I'm thinking of naming all my pages index and sticking them inside folders. That way, visitors can reach a page by typing in www.geobop.com/birds/ , whether the full URL is www.geobop.com/birds/index.htm or www.geobop.com/birds/index.php Is this a good plan, or do you see any problems? Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Renaming all pages to .php
At 09:16 PM 6/19/2003 -0500, Joshua Stein wrote: it won't cause any problems. you'll have the very small overhead of having to run every static page through php's parser, but if you're going to have php in these pages in the future it doesn't really matter. Also, I'm thinking of naming all my pages index and sticking them inside folders. again, no problems. just make sure your web server is setup to search for index.php as a directory index page. I don't know exactly what you mean, but I just renamed one of my pages (using Dreamweaver) with a .php extension, previewed it in Mozilla, and it worked fine. This is the address displayed in the browser: file:///C:/sites/geosymbols/birds.php However, when I pasted the URL into Internet Explorer. So I linked to the page from page X, previewed page X in IE and clicked the link and was taken to C:\sites\geosymbols\waldman.php That's weird. I never even realized my two browsers displayed localhost links differently - file:///c versus C:, and forward slashes versus back slashes. But I assume that means my server is set up properly. As long as I can preview my pages, I can't complain! * * * * * * * * * * Doug Thompson: You or your company better get busy and hire a competent programmer to complete your project in the alloted time; or you might consider posting to a list of a more general nature and see if anyone there wants to do your work for no pay. So you're saying I should get php installed and running on my pages before I change the extensions? I wouldn't ask anyone to my work for no pay; I have more than 300 pages on my site, and it's a fairly complex project. * * * * * * * * * * Mike Brum: You can easily add the .php extension to any .htm(l) page that you have with no worries as long as you have PHP installed and configured properly. The only problem is that page load will be SLIGHTLY slower since PHP will search all .php pages for PHP code to evaluate. Upon finding none, it will simply return the HTML to the requester. But note that this is a tiny bit longer than your web server just serving the page without passing it through PHP. Naming all files index.XXX will be a good idea. Though realize that some people might link directly to the file itself (which can sometimes become visible with different browsers and different activities). But none-the-less, it will work for most users if they do decide to bookmark the folder. Alright, it sounds like a go. Thanks for all the tips. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php