Re: full path link required question

This is a discussion on Re: full path link required question within the Apache Web Server forums, part of the Web Server and Related Forums category; In article <6monhvsm2n1cbtoqkcf7oiegld7grihd1a@4ax.com>, johannes m.r. <psychosos@gmx.at> wrote: > Well, actually it'...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-21-2003
patpro
 
Posts: n/a
Default Re: full path link required question

In article <6monhvsm2n1cbtoqkcf7oiegld7grihd1a@4ax.com>,
johannes m.r. <psychosos@gmx.at> wrote:

> Well, actually it's nobody's fault. Probably your old host had
> activated mod_speling (or smiliar) which corrects typos and also
> allows you to "forget" the file extension.
> Probably your new host just has not activated this module. So the
> behaviour you experience is correct.
>
> If you want the old behaviour ask your new host whether they'd be
> willing to activate mod_speling!
> HTH!
> johannes



mod_speling is not what you're looking for, it allows only ONE typo in
the file name, ie. with mod_speling, index.htmk will be corrected into
index.html (is the first does not exist and the second does).
index will not give index.html because the 2 words are too much
different.
  #2 (permalink)  
Old 07-21-2003
patpro
 
Posts: n/a
Default Re: full path link required question

In article <o6mohv0mq51nr236gvvb88ju8pbecot8oo@4ax.com>,
johannes m.r. <psychosos@gmx.at> wrote:

> Heh - thanks for your other idea (MultiViews), I didn't think about
> that.
>
> >mod_speling is not what you're looking for, it allows only ONE typo in

>
> Try it. I just tried it once again with 1.3.28 and 2.0.47. When I
> request /odbc (some test script I made) it gives me /odbc.php; same
> with .htm and .html files and probably every other file type as well.


I tried, take a look :

http://rack.patpro.net/~patpro/withoutspel/test
http://rack.patpro.net/~patpro/withspel/test

<Directory /home/patpro/public_html/withspel>
CheckSpelling On
Options -Multiviews
</Directory>
<Directory /home/patpro/public_html/withoutspel>
CheckSpelling Off
Options -Multiviews
</Directory>


the existing file is in both case "test.html", with mod_speling
test.html is not served when you request "test".

And I must admit there is a problem here. The apache doc says :
---
It does its work by comparing each document name in the requested
directory against the requested document name without regard to case ,
and allowing up to one misspelling (character insertion / omission /
transposition or wrong character). A list is built with all document
names which were matched using this strategy.
---

well, test has 5 omitted chars compared to test.html, right ? so
mod_speling must not return any result, just a 404. (according to the
doc)

the doc continues :
---
If, after scanning the directory,
no matching document was found, Apache will proceed as usual and return
a "document not found" error.
---

I should get this, according to first part of the doc.

---
only one document is found that "almost" matches the request, then it is
returned in the form of a redirection response.
---

I could get this, because my test.html is alone in it's own directory :
one doc, no choice, transparent redirect, but I don't.

---
more than one document with a close match was found, then the list of
the matches is returned to the client, and the client can select the
correct candidate.
---

I get this ! it looks crazy

I've added tesx.html, and tesl.html into withspel/, and now the redirect
proposal works ok, so I guess the first redirect I've experienced is
from a non-documented feature. if the basename for the file is the same
as other files into the directory, then a redirect proposal is issued.


patpro
  #3 (permalink)  
Old 07-22-2003
johannes m.r.
 
Posts: n/a
Default Re: full path link required question

Thanks for your detailed reply again. Again, it was my fault - I
simply didn't think about deactivating MultiViews when I tried it :o
But yea, it's funny to get a "multiple choices" with only one choice
;-)
Sorry for my sloppiness
cheers!
johannes

  #4 (permalink)  
Old 07-22-2003
patpro
 
Posts: n/a
Default Re: full path link required question

In article <pe3qhvs0hps230suts0pjh5k0pi09eivm8@4ax.com>,
johannes m.r. <psychosos@gmx.at> wrote:

> Thanks for your detailed reply again. Again, it was my fault - I
> simply didn't think about deactivating MultiViews when I tried it :o
> But yea, it's funny to get a "multiple choices" with only one choice
> ;-)


It was interesting for me to test extensively mod_speling (it was the
first try for me), and the "hidden feature" that deals with basename of
files is important to know in terms of security.

regards,

patpro
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:26 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0