You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Magee <sm...@sacto.com> on 2002/07/26 00:59:45 UTC

NT to Linux convertion

We are converting our server from NT to Linux w/apache 1.3.26.
Embeded in thousands of doucments are upper and lower case HREF's.

What are the lines needed to be inserted into the httpd.conf file
so the "url-filename" will convert to all lowercase?  This will only
affect the directory path and filename.

Thank you,
Steve Magee





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


How do you execute UNIX script file

Posted by Steve Magee <sm...@sacto.com>.
I'm trying to get the basic UNIX tr command to work within a script file.
I have the following set in my httpd.conf file...

     RewriteEngine on
     RewriteMap    convert    prg:/usr/local/bin/conv.sh
     RewriteRule ^(.*)$ ${convert:$1}

/usr/local/bin/conv.sh is a UNIX script with 755 permission and root:root
ownership.

#!/bin/bash
/usr/bin/tr '[A-Z ]' '[a-z_]'

I ran apachectl configtest and all is "ok" then I run apachectl restart.
When trying to load a page, I get

Bad Request
Your browser sent a request that this server could not understand.
Apache/1.3.26 Server at web05.arb.ca.gov Port 80

I tried Options All for the /usr/local/bin directory.  I have tried putting
a pipe as the first
character in the UNIX script file.  I have tried AddHandler with ".sh"
added.  If I
rename the "/usr/local/bin/conv.sh" file and run "apachectl configtest", it
states file not
found.  If the /usr/local/bin/conv.sh file is empty, I get the same results.

Any help would be appreciated.
Steve Magee



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: NT to Linux convertion

Posted by Jeff Beard <je...@cyberxape.com>.
Item from the page referenced:

# the module is unable to correct misspelled user names (as in 
http://my.host/~apahce/), just file names or directory names.

Just filenames and directories. You'll need to do a search and replace 
of all files and lower case the a hrefs that link to locally hosted 
files. I'm not that great with regular expressions so I wasn't able to 
come up with one in my alloted 5 minutes per support mail. :) But that's 
what you need to do and it can be done with a regular expression.

If you don't have inhouse Perl hackers feel free to ping me and I'll 
spend the time to work it out.

--Jeff


Daniel Lopez wrote:
> On Thu, Jul 25, 2002 at 03:59:45PM -0700, Steve Magee wrote:
> 
>>We are converting our server from NT to Linux w/apache 1.3.26.
>>Embeded in thousands of doucments are upper and lower case HREF's.
>>
>>What are the lines needed to be inserted into the httpd.conf file
>>so the "url-filename" will convert to all lowercase?  This will only
>>affect the directory path and filename.
> 
> 
> You probably want mod_speling
> http://httpd.apache.org/docs-2.0/mod/mod_speling.html#checkspelling
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: NT to Linux convertion

Posted by Daniel Lopez <da...@rawbyte.com>.
On Thu, Jul 25, 2002 at 03:59:45PM -0700, Steve Magee wrote:
> We are converting our server from NT to Linux w/apache 1.3.26.
> Embeded in thousands of doucments are upper and lower case HREF's.
> 
> What are the lines needed to be inserted into the httpd.conf file
> so the "url-filename" will convert to all lowercase?  This will only
> affect the directory path and filename.

You probably want mod_speling
http://httpd.apache.org/docs-2.0/mod/mod_speling.html#checkspelling


-- 
Teach Yourself Apache 2 -- http://apacheworld.org/ty24/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org