When you say redirect, do you mean a cgi-script written in sh, why not use Apache's mod_redirect, it is safer and faster and specifically designed for this task?
Such a script would examine the value of $REQUEST_URI and $QUERY_STRING and if they met the criteria sent a 302 response eg if and egrep should be enough to check the request for either pattern.
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)
Hey!
Does anyone know how to create rewrite rules to change:
“link.html?hl=en” to “/en/link.html”
“link.html?hl=jp” to “/jp/link.html”
“link.html?hl=es” to “/es/link.html”
etc?
Where "link.html" changes based on the page request? (2 Replies)
Hi,
I am new to Apache but I have requirement as follows.
if the url is http://images/data1/templates/ it should redirect to http:/172.20.224.23/templates/
if the url doesn't have "data1/templates" (mean http://images/) it should redirect to http://images:8080/.
I tried as below
... (3 Replies)
Could you help me to write nginx rewite rules for activecampaign at present they only have a apache rewrite rules which to be put in .htaccess
cat .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# KB
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}... (0 Replies)
I've seen so many times that programmers were confused about shell quoting and white spaces interpretation, that I decided to investigate that problem deeper. And my conclusion is that quoting in shells is very different from other programming languages. Programmers who have bigger experience in... (6 Replies)
trying to write up a script to put the suffix back.
heres what I have but can't get it to do anything :(
would like it to be name.date.suffix
rsync -zrlpoDtub --suffix=".`date +%Y%m%d%k%M%S`.~" --bwlimit=1024 /mymounts/test1/ /mymounts/test2/
while IFS=. read -r -u 9 -d '' name... (1 Reply)
The POSIX shell standard grammar rules are at
Shell Command Language
I am trying to understand Rule 7 and I don't. I think there may be some mistakes there. I am not complaining about the standard; rather, I am concerned that my perception is wrong, and I don't understand something important.... (3 Replies)
Discussion started by: Mark_Galeck
3 Replies
LEARN ABOUT SUNOS
nissetup
nissetup(1M) System Administration Commands nissetup(1M)NAME
nissetup - initialize a NIS+ domain
SYNOPSIS
/usr/lib/nis/nissetup [-Y] [domain]
DESCRIPTION
nissetup is a shell script that sets up a NIS+ domain to service clients that wish to store system administration information in a domain
named domain. This domain should already exist prior to executing this command. See nismkdir(1) and nisinit(1M).
A NIS+ domain consists of a NIS+ directory and its subdirectories: org_dir and groups_dir. org_dir stores system administration informa-
tion and groups_dir stores information for group access control.
nissetup creates the subdirectories org_dir and groups_dir in domain. Both subdirectories will be replicated on the same servers as the
parent domain. After the subdirectories are created, nissetup creates the default tables that NIS+ serves. These are auto_master,
auto_home, bootparams, cred, ethers, group, hosts, mail_aliases, netmasks, networks, passwd, protocols, rpc, services, and timezone. The
nissetup script uses the nistbladm(1) command to create these tables. The script can be easily customized to add site specific tables that
are created at setup time.
This command is normally executed just once per domain.
While this command creates the default tables, it does not initialize them with data. This is accomplished with the nisaddent(1M) command.
It is easier to use the nisserver(1M) script to create subdirectories and the default tables.
OPTIONS -Y Specify that the domain will be served as both a NIS+ domain as well as an NIS domain using the backward compatibility flag. This
will set up the domain to be less secure by making all the system tables readable by unauthenticated clients as well.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWnisu |
+-----------------------------+-----------------------------+
SEE ALSO nis+(1), nismkdir(1), nistbladm(1), nisaddent(1M), nisinit(1M)nisserver(1M), attributes(5)NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are
available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html.
SunOS 5.10 13 Dec 2001 nissetup(1M)