Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-06-2013, 10:36 AM   #1
LQ Newbie
Registered: Apr 2003
Location: NY, USA
Posts: 16

Rep: Reputation: 0
Squid problem

Hi guys, I have a little problem here. I have been tasked with building out a squid proxy with the purpose of a web request coming in from the internet, hitting squid, and if the request is for a certain set of urls (we'll use for example) gets translated. For example, if the request is for, qquid would translate it to Squid by itself works find but when I try to get a url_rewrite perl script to work I get the error message of squid[3286]: The store_rewriter helpers are crashing too rapidly, need help!

Here is the code from the perl script I am using (I don't know perl, I found this online and was changing the domain info myself).

use strict;

# Turn off buffering to STDOUT
$| = 1;

# Read from STDIN
while (<>) {

my @elems = split; # splits $_ on whitespace by default

# The URL is the first whitespace-separated element.
my $url = $elems[0];

# Handle links and translate them to
# with the rest of the URL intact (if present). Ignore warnings...
if ($url =~ m#^http://\.dev\.sendwordnow\.com(/.*)?#i) {

$url = "http://.dev.sendwordnow.local${1}";

print "$url\n";


# The last part, "(/.*)?", is redundant, but I added it because it might
# be useful to some. That part would be in $1 in this example.
elsif ($url =~ m#^http://\.sendwordnow\.com(/.*)?#i) {

# Redirect them to some intranet site...
$url = "http://\.dev.sendwordnow.local${1}";

print "$url\n";



else {

# Unmodified URL
print "$url\n";

Thank you in advanced.

Old 12-10-2013, 09:05 AM   #2
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
I do not know if this is your issue but you are escaping the first period in the URL below.
$url = "http://\.dev.sendwordnow.local${1}";
Translation would be


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is it possible to use squid in same ip subnet with WAN IP? Iptables Squid port problem. neopandid Linux - Server 2 03-18-2013 03:14 AM
Problem with configuration of Squid server behind a squid ajitup Linux - Server 13 08-12-2009 11:55 PM
Squid Problem (squid restrict some trusted sites.). jpmaxyusuf Linux - Networking 3 01-01-2009 12:33 PM
squid problem hariiyer Linux - Networking 6 02-14-2005 07:27 AM
Squid Problem MgF Linux - Software 2 08-26-2003 07:00 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration