Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 19th, 2000, 03:52 AM
frequenC1 frequenC1 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 1 frequenC1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have a rewrite setup but it's getting the path incorrect. I have:
domain.com/news/300.html

to go to:

domain.com/article.php?news_id=300

but the problem is that it thinks that /news is part of the path for the images folder (e.g. domain.com/news/images instead of domain.com/images) so all my images break. It seems like it would just use the folder level that script was envoked by. Any ideas? Is this an Apache config or a rewrite error?

Reply With Quote
  #2  
Old October 19th, 2000, 02:00 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
You need EXTERNAL Redirect, not INTERNAL.

Start here -> http://www.apache.org/docs/misc/rewriteguide.html and look under "Trailing Slash Problem".

#############################################
Solution:
The solution to this subtle problem is to let the server add the trailing slash automatically. To do this correctly we have to use an external redirect,
so the browser correctly requests subsequent images etc. If we only did a internal rewrite, this would only work for the directory page, but
would go wrong when any images are included into this page with relative URLs, because the browser would request an in-lined object. For
instance, a request for image.gif in /~quux/foo/index.html would become /~quux/image.gif without the external redirect!
#############################################

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > rewrite and path confusion


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway