Hi!
Check out these two related articles (and user comments) :
Building Dynamic Pages With Search Engines in Mind :
--------------------------------------------------------
* http://phpbuilder.com/columns/tim19990117.php3
* http://phpbuilder.com/columns/tim20000526.php3
Also check phpinfo() for available predefined variables and plan
accordingly.
Predefined Variables :
--------------------------------------------------------
* http://www.php.net/manual/en/language.variables.predefined.php
And for the brave, check out mod_rewrite :
Mod-Rewrite :
--------------------------------------------------------
* http://httpd.apache.org/docs/mod/mod_rewrite.html
* http://www.engelschall.com/pw/apache/rewriteguide/
* http://marc.theaimsgroup.com/?l=php-general&s=mod_rewrite
Regards,
Philip Olson
http://www.cornado.com/
On Sun, 25 Mar 2001, Jaxon wrote:
> oops :)
>
> http://www.domain.com/index.php/main/index.html?ii=1
> versus
> http://www.domain.com/index.php/main/index.html
>
> I want to get "index.html" and "main" into variables, as the two items will
> always be present - if $ii is set, I want to strip it from the URI before
> parsing the items out.
>
> I suppose with parse_url() I could do something..but I really only want to
> deal with the URI.
>
> currently, this seems to work:
>
> $path_array = explode('/', $REQUEST_URI);
>
> if (isset($ii)) array_pop($path_array); // remove $ii
> $page_name = array_pop($path_array); //get page name from end of array
> $tpl = array_pop($path_array); //get page type from next item
>
> but is inelegant :)
>
> regards,
> jaxon
>
> > In article <[EMAIL PROTECTED]>,
> > [EMAIL PROTECTED] (Jaxon) wrote:
> >
> >> Any way to combine both forms of url parsing?
> >> I want to use standard slash notation for navigation ,but also account for
> >> the occasional variable used within a single page.
> >>
> >> e.g. URL can be either:
> >> domain.com/index.php/main/index.html?ii=1
> >>
> >> or:
> >> domain.com/index.php/main/index.html?ii=1
> >
> > Umm, how are these different?
> >
> > (If you're trying to extract info from a url, perhaps
> > parse_url(),basename(), and/or dirname() are what you're seeking...?)
>
>
> --
> 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]