9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script to send an email like below. Problem is, the if ..fi block is not getting executed, and is coming as a part of the email body. Can anyone take a look at this? :confused:
Log file shows this:
SEND_MAIL.prog: line 64:
: command not found
echo "Input Parameters"
echo... (11 Replies)
Discussion started by: mansmaan
11 Replies
2. Web Development
I have the following directive in my .htaccess:
#RewriteRule ^mozrank/?$ "http://www.seobook.com/#a_aid=dh"
The problem is that the redirect is going to
http://www.seobook.com/%23a_aid=dh
How to preserve the # when redirecting? (2 Replies)
Discussion started by: rlopes
2 Replies
3. Shell Programming and Scripting
Hi,
I have perl script which is calling an external command using "system()" with argument.
But i am not able to capture the output.Even tried with backtick also with no luck.
.
.
$number=<>;
system ("cmd $number >output.txt"); (2 Replies)
Discussion started by: rasingraj
2 Replies
4. UNIX for Advanced & Expert Users
Hi,
I would like to use htaccess 301 redirect with URL hiding.
Ex:
when browse the website 'abc.com' it should show the contents of the page 'xyz.com/start/index.html' but in addressbar should show the domain 'abc.com'. I know it works with html URL frame rewrite. But my question is it... (0 Replies)
Discussion started by: chandranjoy
0 Replies
5. UNIX for Dummies Questions & Answers
Hello,
Well I have a web with a very bad structure (a vBulletin forum) and I want it redirected to a newer folder in the same server but with a upper level folder.
Current structure is:
https://www.unix.com/vbulletin/upload/index.php
And I want it to be:... (0 Replies)
Discussion started by: Rafaweb
0 Replies
6. UNIX for Advanced & Expert Users
I am looking to forward the following with masking via my .htaccess file:
www.mywebsite.com/origpage www.mywebsite.com/newpage
I do not want to forward the entire site, just this one page with masking. Neither page has an extension. I am able to forward with .htaccess - but it does not mask the... (1 Reply)
Discussion started by: globalnerds
1 Replies
7. Solaris
Hello all,
I have a script that I am trying to execute and redirect the output to a file, but I have trouble in redirection. The cron job is running properly as I see it in the mail.
This is what I am doing
In crontab file,
0 4 * * * somescript.sh > /some_location/`date '+%m%d%y_%H%M'`.log... (9 Replies)
Discussion started by: grajp002
9 Replies
8. Shell Programming and Scripting
I am using the time command in a script however the output of the time command will display on my screen but not my output file. Any Ideas on how to fix this?
> cat test.sh
#############################
#!/usr/bin/sh
for COMMAND in pwd
do
time ${COMMAND}
done | sed "s/^/ ... (4 Replies)
Discussion started by: 2dumb
4 Replies
9. UNIX for Advanced & Expert Users
Hi all hope you can help as I am going MAD!!! :eek:
The below is in a shell script but the redirection in the sed line does not work and outputs to the screen and the $fname_2 does note get created ?????
Can any one help ??
#!/bin/ksh
cd /app/
for fname in `ls -1 X*`
do
sed 1d $fname... (3 Replies)
Discussion started by: mlucas
3 Replies
CGI::Application::Plugin::Redirect(3pm) User Contributed Perl Documentation CGI::Application::Plugin::Redirect(3pm)
NAME
CGI::Application::Plugin::Redirect - Easy external redirects in CGI::Application
SYNOPSIS
package My::App;
use CGI::Application::Plugin::Redirect;
sub cgiapp_prerun {
my $self = shift;
if ( << not logged in >> ) {
return $self->redirect('login.html');
}
}
sub byebye {
my $self = shift;
return $self->redirect('http://www.example.com/', '301 Moved Permanently');
}
DESCRIPTION
This plugin provides an easy way to do external redirects in CGI::Application. You don't have to worry about setting headers or worrying
about return types, as that is all handled for you.
"redirect" does an external redirect, which means that the browser will receive a command to load a new page, and a fresh request will come
in. If you just want to display the results of another runmode within the same module, then it is often sufficient to use the "forward"
method in CGI::Application::Plugin::Forward instead.
METHODS
redirect($url, $status)
Interupt the current request, and redirect to an external URL. If you happen to be inside a prerun method when you call this, the current
runmode will automatically be short circuited so that it will not execute. As soon as all prerun method have finished, the redirect will
happen without the runmode being executed.
The $status parameter is optional as the CGI module will default to something suitable.
return $self->redirect('http://www.example.com/');
- or -
return $self->redirect('http://www.example.com/', '301 Moved Permanently');
SEE ALSO
CGI::Application, CGI::Application::Plugin::Forward, perl(1)
AUTHOR
Cees Hek <ceeshek@gmail.com>
LICENCE AND COPYRIGHT
Copyright (c) 2005, Cees Hek. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED ORIMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSESSUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
perl v5.12.3 2011-06-25 CGI::Application::Plugin::Redirect(3pm)