Thanks , franklin you method worked, i knew i had to use a while loop and getline in there just didnt know the proper order :)
Hi everyone, im trying to make the following command line shorter by introducing a script that join up all the grep commands
./new1a < numbers.txt | grep -i -v '^a '... (5 Replies)
I'm looking to have function that takes the present month and rewrites it into this form: _06_ (june), _09_ (september), and so on..
I would like this to be a my $this_month=code that rewrites date function
because I would like to be a able to call it multiple times in the script by writing... (5 Replies)
Hello All,
I have been asked to create a .htaccess redirect. I have never attempted to work with one of these files. We have a pretty vanilla LAMP setup using rhel4 apache1.3 and php4.2.3.
I was instructed to place the .htaccess file in the document root of the site and and to attempt to... (1 Reply)
Hi All,
I want to redirect from http://localhost/abc/xyz/def?cc=dk&lc=da
to http://localhost/abc/mnc/pdf?cc=dk&lc=da.
Please suggest a rewrite rule. (0 Replies)
hi there, I need that when user input
mysite.com/ponuka/AAA2869
it shows
mysite.com/ukaz.php?ponuka=AAA2869
because of facebook likes, and I found out that this is set up as rewrite rule in .htaccess file? how to achieve it?
thank you... :confused:
---------- Post updated at 04:47... (0 Replies)
Hi,
I have a domain "test.example.com" and i wanted to redirect only request like "test.example.com /index.html" to "test.example.com/index.html?NEW=1". Please note that a extra string "?NEW=1" added at the end of the URL.
So Request for http://test.example.com/index.html REDIRECTS TO... (12 Replies)
Hi all,
I am trying to find a rewrite rule that can help me with the following situation.
So I am currently on a page which has a URL:
http://www.test.mobile.com/#!/shop/phones/max-plus/features/
Now when I hover over a certain link, I can see that it will goto:
<a... (0 Replies)
Discussion started by: Junaid Subhani
0 Replies
LEARN ABOUT DEBIAN
apache2::sitecontrol::rule
Apache2::SiteControl::Rule(3pm) User Contributed Perl Documentation Apache2::SiteControl::Rule(3pm)NAME
Apache2::SiteControl::Rule - Permission manager access rule.
DESCRIPTION
Each rule is a custom-written class that implements some aspect of your site's access logic. Rules can choose to grant or deny a request.
package sample::Test;
use strict;
use warnings;
use Carp;
use Apache2::SiteControl::Rule;
use base qw(Apache2::SiteControl::Rule);
sub grants($$$$)
{
my $this = shift;
my $user = shift;
my $action = shift;
my $resource = shift;
if($action eq "edit" && $resource->isa("sample::Record")) {
return 1 if($user{name} eq "root");
}
return 0;
}
sub denies($$$$)
{
return 0;
}
1;
The PermissionManager will only give permission if at least one rule grants permission, and no rule denies it.
It is important that your rules never grant or deny a request they do not understand, so it is a good idea to use type checking to prevent
strangeness. Assertions should not be used if you expect different rules to accept different resource types or user types, since each rule
is used on every access request.
EXPORT
None by default.
SEE ALSO
Apache2::SiteControl::UserFactory, Apache::SiteControl::ManagerFactory, Apache2::SiteControl::PermissionManager, Apache::SiteControl
AUTHOR
This module was written by Tony Kay, <tkay@uoregon.edu>.
COPYRIGHT AND LICENSE perl v5.14.2 2006-03-17 Apache2::SiteControl::Rule(3pm)