Re: [PHP] Building my site... again
Andrew- > Note, > > This will not work with PHP as a CGI. I honestly don't know, as I don't run PHP as a CGI. However... if there is a problem with this, I would be inclined to think that it was Apaches fault, and not PHPs. Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
Nick- > That will still cause a problem though won't it (i think I wrote my > example URL this way also!) as the index.php gets in the way. Hence the > use of a .htaccess to force php to treat a file called 'index' as a php > file. Like: > > URL= http://you.com/index/cars/ferrari Nah... the search engines don't care at all. However if you're picky, you can rename the file from "index.php" to "index" (or whatever you want) and then add a ForceType via Apache's .htaccess like this: ForceType application/x-httpd-php Put... that step is really for "cleanliness" of the URL, as the spiders don't care at all. Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Andrew Hill blurted > Nick, > > Dunno, but in my experience (and that of a few people who also opened bugs > on it) any path info that is not "real" causes the CGI to bomb out with an > "Internal Server Error". Hi Andrew, check out my .htacces, I'm sure this would help you do it :) # .htacces file containing Apache directives # for 'search engine friendly' indexing and # custom error pages # First the 404 ErrorDocument 404 /general/404.php # Now the page handlers ForceType application/x-httpd-php HTH - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UYSkHpvrrTa6L5oRAuyvAJ45FhFMet/FHetUGaMaBSTrL6oFgwCcD6QD zWXIc3wqOYulBo/pPS0LVGw= =MMsp -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Building my site... again
Nick, Dunno, but in my experience (and that of a few people who also opened bugs on it) any path info that is not "real" causes the CGI to bomb out with an "Internal Server Error". So while this will work: index.php?foo=bar This will not, since there is no physical directory "foo" and no file "bar": index.php/foo/bar Best regards, Andrew Hill > -Original Message- > From: Nick Wilson [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 25, 2002 11:03 AM > To: PHP-General > Subject: Re: [PHP] Building my site... again > > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > * and then Andrew Hill blurted > > Note, > > > > This will not work with PHP as a CGI. > > How come? > > - -- > > Nick Wilson > > Tel: +45 3325 0688 > Fax: +45 3325 0677 > Web: www.explodingnet.com > > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE8UYGlHpvrrTa6L5oRAiOUAJ4+utKQrhQ2Vy4533lLjriNO8sXmQCfRJrw > cackhuwr2ACMGFu/fbYxfcs= > =3wVL > -END PGP SIGNATURE- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then daniel blurted > To ensure that the search engines like you and your pages, you can > make your URLs appear more normal by doing something like this: > > URL= http://you.com/index.php/cars/ferrari That will still cause a problem though won't it (i think I wrote my example URL this way also!) as the index.php gets in the way. Hence the use of a .htaccess to force php to treat a file called 'index' as a php file. Like: URL= http://you.com/index/cars/ferrari - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UYKgHpvrrTa6L5oRAoiuAJ4nfc5TD1xjOlOHXZpa/m+lPEIGjQCaArY9 RCJ7Rb7TE8WWDPU3/yFi7hQ= =tJZl -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Andrew Hill blurted > Note, > > This will not work with PHP as a CGI. How come? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UYGlHpvrrTa6L5oRAiOUAJ4+utKQrhQ2Vy4533lLjriNO8sXmQCfRJrw cackhuwr2ACMGFu/fbYxfcs= =3wVL -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
> Now. I would of course like for my site to be listed in the search engines, > and I wouldn't mind getting search hits on both cars and ferrari. But. Will > the web spiders and web crawlers ever follow a link like > index.php?page=cars&subpage=ferrari and will they ever index what they find > there, and, and, and, and... > > Well... does anyone understand what I'm asking here? WOuld this be a good > way to build my site to ensure getting hits from search engines, or should I > do this some other way? Anyone know? To ensure that the search engines like you and your pages, you can make your URLs appear more normal by doing something like this: URL= http://you.com/index.php/cars/ferrari Then... in your code you can access the additional data by looking at the $PATH_INFO variable: Hope this helps, Daniel J. Lashua -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Building my site... again
Note, This will not work with PHP as a CGI. Best regards, Andrew Hill > * and then Torkil Johnsen blurted > > Now. I would of course like for my site to be listed in the > search engines, > > and I wouldn't mind getting search hits on both cars and > ferrari. But. Will > > the web spiders and web crawlers ever follow a link like > > index.php?page=cars&subpage=ferrari and will they ever index > what they find > > there, and, and, and, and... > > Some will, some wont. The trick is to use something like this > index.php/cars/ferrari using Apache's backward searching feature. > Together with a very simple .htaccess you can fool Apache into looking > for the dirctory 'ferrari' and when it doesn't find it look for the dir > cars (php assigns these values to the vars $page and $subpage) and when > it finally finds index.php you can feed it those vars and let it do its > stuff. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Torkil Johnsen blurted > Now. I would of course like for my site to be listed in the search engines, > and I wouldn't mind getting search hits on both cars and ferrari. But. Will > the web spiders and web crawlers ever follow a link like > index.php?page=cars&subpage=ferrari and will they ever index what they find > there, and, and, and, and... Some will, some wont. The trick is to use something like this index.php/cars/ferrari using Apache's backward searching feature. Together with a very simple .htaccess you can fool Apache into looking for the dirctory 'ferrari' and when it doesn't find it look for the dir cars (php assigns these values to the vars $page and $subpage) and when it finally finds index.php you can feed it those vars and let it do its stuff. I can't remember all the details as it was ages ago that I did this on my site but you can find a very good tutorial on www.sitepoint.com you'll have to do a little searching as it was written quite a while ago but it'll be well worth your while. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UYBCHpvrrTa6L5oRAuwdAJ9PWgFKOylhOrPz6rv7KBifXcbdjgCfUQax 7csTk0GnAC17z8ie8RGFqYU= =NaWj -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]