rewrite rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am new to using mod_rewrite and have been trying to create a rule to do something rather simple, but keep hitting a wall.  I have been trying to research online how to do it, but I keep finding global changes and not specific to what I am trying to do.  Essentially I am looking to use a rewrite rule to redirect users in an application from

 

http://server4/perl.pl?n=1  to http://server1/perl.pl?n=1

 

 

I tried using

RewriteEngine on

Options +FollowSymlinks

RewriteCond %{QUERY_STRING}  ^n=1$

RewriteRule ^$ http://127.0.0.1/ perl.pl [L]

RewriteCond %{QUERY_STRING}  ^n=2$

RewriteRule ^$ http://127.0.0.1/ perl.pl [L]

RewriteCond %{QUERY_STRING}  ^n=3$

RewriteRule ^$ http://mypcname/perl.pl [L]

 

 

 

To test on my local host but I am guessing that it is not even close to what I want to do.

 

 

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access or use by any other person to this internet email is not authorized and may be unlawful. If you are not the intended recipient, please delete or destroy this email. If you do not wish to receive future emails from this sender, please reply directly to this email requesting you be removed from any mailing list.

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux