[thelist] Re: PHP and / instead of ?

RUST Randal RRust at COVANSYS.com
Mon Jan 20 07:11:01 CST 2003


Kelly Hallman said:

> > http://www.tntluoma.com/ethan/daily/20030117 looks much nicer than
> > having the ? in front of the '2003'
>
> I have attempted a similar thing before but noticed that an
> unpleasant side-effect of this approach is it breaks all
> relative references...

I'm not quite sure what you are getting at.  By rewriting the index
file, and forcing it to execute as PHP, you can lose the file extension
on your page, but you don't break the relative paths, because you never
actually load *page.php.*

On my site, http://www.r2communications.com, you'll see that the menu
looks like this:

	<li><a href="/index/home">home</a></li>
	<li><a href="/index/about">about</a></li>
	<li><a href="/index/print">print</a></li>
	<li><a href="/index/web">web</a></li>
	<li><a href="/index/multimedia">multimedia</a></li>
	<li><a href="/index/articles">articles</a></li>
	<li><a href="/index/contact">contact</a></li>

When I click on *about,* the page doesn't go to */index/about,* it
simply loads *about.php* into the content space of the page.

I got the idea from an Evolt article.

http://evolt.org/article/Making_clean_URLs_with_Apache_and_PHP/18/22880/
index.html

----------
Randal Rust
Covansys Corp.
Columbus, OH



More information about the thelist mailing list