Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #8936
| Date | 2013-04-04 01:48 -0700 |
|---|---|
| From | Cal Dershowitz <cal@example.invalid> |
| Newsgroups | comp.lang.php |
| Subject | Re: cleaning up first php page was Re: can't get includes to load |
| References | (1 earlier) <ard4vmFub4uU1@mid.individual.net> <3bednVqnL5qAhc_MnZ2dnUVZ_q6dnZ2d@supernews.com> <oik4l8p0ba3bul14o0ohu58ad1l3opae1d@4ax.com> <hJqdnQmwLeGRBM_MnZ2dnUVZ_oednZ2d@supernews.com> <arfnkvFheqeU1@mid.individual.net> |
| Message-ID | <FcCdnTrRReXGo8DMnZ2dnUVZ_uKdnZ2d@supernews.com> (permalink) |
On 03/27/2013 01:06 AM, J.O. Aho wrote: > On 27/03/13 08:00, Cal Dershowitz wrote: >> What is a person supposed to do about the fact that if you just type in >> www.merrillpjensen.com , you get the old index.html? Should I just >> re-direct that to a php version? > > Delete the index.html and problem solved. Alright, well it takes me a couple weeks to catch up on the reading with this stuff, but I now have a php-written page that has some measure of functionality to it: http://www.merrillpjensen.com/ I think task one might be populating the dummy links, and they work, so woo-hoo. With the nav links, they have to be populated such that their relative addresses are gonna work and herewith my next design head-scratcher. Q1) Am I correct to think that for my stage of the ballgame, I want to have a unique .css file to which all pages refer? For ease of upload with Filezilla, I'd like to put it in the includes directory, which is a ways off from where I'd like to find it with my 'about' page: $ pwd /home/sites/migrate/php/php1/includes $ ls footer.php header.php nav.php sidebar.php style.css footer.php~ header.php~ nav.php~ sidebar.php~ $ cd .. $ echo root document directory root document directory $ cd pages/ $ cd about/ $ cat index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ... <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> What I thought I could get away with was the preliminary hack of copying and pasting style.css into that folder, but it's just not gonna work until I get the relative-addressing figured out. Q2) How do I refer to a "first cousin once removed" file that is 2 up and one down in includes/ ? Q3) For lack of a better idea, I used the headers of my original index.php page for the one that will be in pages/about/ . How do I write this small, derivative page without requiring the browser to re-do everything it did to load the home page? For example, nothing is to change about headers, footers, nav, sidebar during this invocation. > > Another case, as you seem to give out a link with index.* it can be good > to use the apache rewrite module to redirect those who try to access the > index.html file directly, in your .htaccess you could have something > like this: > > RewriteEngine On > RewriteBase / > RewriteRule ^index\.php$ /index.php [L] > > Haven't tested it, so in worst case you need to make some tiny changes. I wonder whether there's an analog between what you do with default and what you do with default-ssl: $ pwd /etc/apache2/sites-available $ ls default default~ default-ssl $ cat default-ssl <IfModule mod_ssl.c> <VirtualHost _default_:443> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> Notice the similarities with default. I haven't been able to wrap my head around ssl yet in this environment but don't want to get farther away from the php of it. > > >> Also taking any and all suggestions* on how to make this start looking >> like a webpage that you would show a client. > > You maybe want to look at a CMS and just make a theme for it and then > add on your own plugins to do things you want it to do and no one else > has already done, then you don't have to reinvent the wheel. > > CMS? plug-ins? Things I know only if different contexts. Thx for your comment, -- Cal
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
can't get includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-25 23:52 -0700
Re: can't get includes to load "J.O. Aho" <user@example.net> - 2013-03-26 09:36 +0100
Re: can't get includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-26 14:50 -0700
Re: can't get includes to load Jim Higgins <ILikeMy@Privacy.bogus> - 2013-03-27 02:14 +0000
Re: can't get includes to load "J.O. Aho" <user@example.net> - 2013-03-27 07:53 +0100
Re: can't get includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-27 02:35 -0700
Re: can't get includes to load "J.O. Aho" <user@example.net> - 2013-03-27 11:00 +0100
Re: can't get includes to load "J.O. Aho" <user@example.net> - 2013-03-27 11:03 +0100
Re: can't get includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-28 00:17 -0700
Git (Was: can't get includes to load) "J.O. Aho" <user@example.net> - 2013-03-28 08:35 +0100
Re: can't get includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-28 00:41 -0700
Git (Was: can't get includes to load) "J.O. Aho" <user@example.net> - 2013-03-28 09:34 +0100
Re: Git (Was: can't get includes to load) Cal Dershowitz <cal@example.invalid> - 2013-03-29 00:28 -0700
Re: Git (Was: can't get includes to load) "J.O. Aho" <user@example.net> - 2013-03-29 13:14 +0100
Re: Git (Was: can't get includes to load) Cal Dershowitz <cal@example.invalid> - 2013-03-31 00:31 -0700
Re: Git (Was: can't get includes to load) "J.O. Aho" <user@example.net> - 2013-03-31 11:54 +0200
cleaning up first php page was Re: can't get includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-27 00:00 -0700
Re: cleaning up first php page was Re: can't get includes to load "J.O. Aho" <user@example.net> - 2013-03-27 09:06 +0100
Re: cleaning up first php page was Re: can't get includes to load Cal Dershowitz <cal@example.invalid> - 2013-04-04 01:48 -0700
Re: cleaning up first php page was Re: can't get includes to load Cal Dershowitz <cal@example.invalid> - 2013-04-04 01:52 -0700
Re: cleaning up first php page was Re: can't get includes to load Jerry Stuckle <jstucklex@attglobal.net> - 2013-04-04 08:57 -0400
Re: can't get includes to load Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-27 09:08 +0100
csiph-web