LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[Webdev] URL writing problem

[Webdev] URL writing problem

Philip Reynolds phil at redbrick.dcu.ie
Tue Oct 2 12:18:49 IST 2001


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 /-------------------




More information about the Webdev mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell