I've got an inkling of a problem with mod_rewrite and I would like
some ideas. I've got one or two of my own, but they're more
workarounds or hacks, and I'm thinking they're might be a better way
to do this.
Say for example you request
www.foo.com/news/
You're first argument news is fed to my PHP script which then does
it's stuff.
www.foo.com/news
First argument is still fed, considering i wrote the rewrite rule in
such a way as the trailing slash doesn't matter. However the problem
is with the browser.
I want to specify relative links, so the link in HTML is
<A HREF="blah/">Blah</A>
However, with the first URL with the trailing slash, you get
www.foo.com/news/blah
with the second, you get
www.foo.com/blah
Can anyone see any fixes for this, without specifying absolute
URL's/PATH's ? There are other workarounds, including wrappers, to
make sure the URL always ends in a '/', but that's a bit messy.
Perhaps I'm missing something totally..
Regards,
Phil.
--
--/ phil at redbrick.dcu.ie /--------------
--/ http://www.redbrick.dcu.ie/~phil /--
--/ Philip Reynolds /-------------------
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!