LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Squid and "www" prefix (https://www.linuxquestions.org/questions/linux-software-2/squid-and-www-prefix-566873/)

grymuz 07-05-2007 11:22 AM

Squid and "www" prefix
 
Hello

At first, I tried Google and searched this forums.
I haven't found the answer though so I'm asking you.

I'm used to Firefox which has a cool feature that
when you type the url http://something.com and there should
be 'www' it redirects you to http://www.something.com.

I'm using squid for some time now, and I would like to implememt
such feature in squid.

For example if the url resolving fails squid would try with the "www" at
the beginning.

I have installed jesred but I'm not sure what kind of
regex rule should I use to achieve this. Mainly how to configure jesred to put
the "www" prefix between http:// and the rest of the hostname.

Thanks in advance.

acid_kewpie 07-05-2007 12:08 PM

this is none of squid's business, it has no role to play in redirection or url manipulation whatsoever. it's not tht it's not able to yet or anything, it's just totally nothign to do with what squid does.

grymuz 07-05-2007 05:45 PM

What is the way to achieve this?
 
Thanks for the reply,
in that case maybe someone knows the way to
achieve that kind of functionality?

Thanks

acid_kewpie 07-06-2007 01:36 AM

i can't see that anything other than a web cliebt / browser has any reason to ever do that at all. doesn't make sense to me.

grymuz 07-06-2007 03:40 AM

Well

I thought about it and I don't see any problem in rewriting any url
without "www" at the beginning to the url with "www".

Let's leave that.

Let's consider web client approach.
Normally Browser gets 404 error, however squid sends it's
own message (at least looks different). Maybe if it was configured to send the errors intact it would work?


All times are GMT -5. The time now is 12:21 AM.