Click here to get back home

htaccess rewriterule in combination with POST form

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
htaccess rewriterule in combination with POST form Bart van den Burg 01-28-2005
Get Chitika Premium
Posted by Bart van den Burg on January 28, 2005, 12:38 am
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Posted by Alan J. Flavell on January 28, 2005, 12:36 am
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
hwo to post to a form? August 10, 2005, 7:25 pm
Form Post April 18, 2008, 7:17 pm
Re: How do you track down the way to POST a form ? February 19, 2008, 8:19 pm
Accessing form POST data July 24, 2004, 10:24 pm
Parsing form POST without CGI.pm on Win32 August 1, 2004, 12:20 am
using LWP to POST data via "javascript:document.form.submit()" link January 3, 2006, 1:20 am
.htaccess mistake December 5, 2007, 2:59 pm
htaccess auth question January 13, 2006, 2:17 pm
Apache htaccess and perl August 5, 2006, 1:38 pm
Read out .htaccess password August 25, 2007, 9:56 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap