RE: mod_rewrite Question

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

 



OK.  I created a link in a file called test.php:

 

<a href="">

 

Rewrite log mentions nothing about redirecting to the assetdetail.php page:

 

10.153.199.5 - - [29/Dec/2012:09:43:02 --0600] [ckcftpa2/sid#26c828][rid#62abb28/initial] (3) [perdir E:/cmdbnew/] strip per-dir prefix: E:/cmdbnew/test.php -> test.php

10.153.199.5 - - [29/Dec/2012:09:43:02 --0600] [ckcftpa2/sid#26c828][rid#62abb28/initial] (3) [perdir E:/cmdbnew/] applying pattern '^/cmdbnew/(.*)/(.*)$' to uri 'test.php'

10.153.199.5 - - [29/Dec/2012:09:43:02 --0600] [ckcftpa2/sid#26c828][rid#62abb28/initial] (1) [perdir E:/cmdbnew/] pass through E:/cmdbnew/test.php

10.153.199.5 - - [29/Dec/2012:09:43:07 --0600] [ckcftpa2/sid#26c828][rid#62b4c08/initial] (3) [perdir E:/cmdbnew/] strip per-dir prefix: E:/cmdbnew/test.php -> test.php

10.153.199.5 - - [29/Dec/2012:09:43:07 --0600] [ckcftpa2/sid#26c828][rid#62b4c08/initial] (3) [perdir E:/cmdbnew/] applying pattern '^/cmdbnew/(.*)/(.*)$' to uri 'test.php'

10.153.199.5 - - [29/Dec/2012:09:43:07 --0600] [ckcftpa2/sid#26c828][rid#62b4c08/initial] (1) [perdir E:/cmdbnew/] pass through E:/cmdbnew/test.php

10.153.199.5 - - [29/Dec/2012:09:43:15 --0600] [ckcftpa2/sid#26c828][rid#61623f0/initial] (3) [perdir E:/cmdbnew/] add path info postfix: E:/cmdbnew/USDADPRTSPW01 -> E:/cmdbnew/USDADPRTSPW01/TPR

10.153.199.5 - - [29/Dec/2012:09:43:15 --0600] [ckcftpa2/sid#26c828][rid#61623f0/initial] (3) [perdir E:/cmdbnew/] strip per-dir prefix: E:/cmdbnew/USDADPRTSPW01/TPR -> USDADPRTSPW01/TPR

10.153.199.5 - - [29/Dec/2012:09:43:15 --0600] [ckcftpa2/sid#26c828][rid#61623f0/initial] (3) [perdir E:/cmdbnew/] applying pattern '^/cmdbnew/(.*)/(.*)$' to uri 'USDADPRTSPW01/TPR'

10.153.199.5 - - [29/Dec/2012:09:43:15 --0600] [ckcftpa2/sid#26c828][rid#61623f0/initial] (1) [perdir E:/cmdbnew/] pass through E:/cmdbnew/USDADPRTSPW01

 

 

From: Akash Jain [mailto:akash.delhite@xxxxxxxxx]
Sent: Friday, December 28, 2012 10:40 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: mod_rewrite Question

 

RewriteRule ^/cmdbnew/(.*)/(.*)$ http://ckcftpa2/cmdbnew/assetdetail.php?srv=$1&cust=$2 [R,L]

If you have any L rule preceeding it, then it may be overwriting it.

Can you try putting the rule i gave you above , and see what the rewrite logs say.

On Sat, Dec 29, 2012 at 10:02 AM, Martin, Stanley G <stanley.martin@xxxxxxxxxxxxx> wrote:

It didn’t work.

 

It’s obvious I subbed in some bogus names, but since I’m trapped behind a firewall and this data isn’t sensitive, my real URl is:

 

http://ckcftpa2/cmdbnew/assetdetail.php?server=Server1&cust=XXX

 

I want them to click on a link that has an href like this:

 

/cmdbnew/Server1/XXX

 

And redirects them to the first one.

 

Head getting flatter.

 

Thanks for the quick first response.

 

_______________________________________________________________________

Email_CBE.gifStanley Martin

System Administrator | IM DCS US Wintel Server Team | Outsourcing Services

 

Capgemini "US" | KCSC Service Center

Tel.: (816) 347-7692 – Mob.: (816) 284-7415

www.capgemini.com

 

777 NW Blue Pkwy

Lee's Summit, MO    64086

People matter, results count.

_______________________________________________________________________

 

From: Igor Cicimov [mailto:icicimov@xxxxxxxxx]
Sent: Friday, December 28, 2012 10:19 PM
To: users
Subject: Re: mod_rewrite Question

 


On 29/12/2012 3:12 PM, "Martin, Stanley G" <stanley.martin@xxxxxxxxxxxxx> wrote:
>
> I have been banging my head against the wall on this and when I think I finally have it, it doesn’t work.  I’ve been able to get some basic stuff to work like:
>
>  
>
> Setting DirectoryIndex
>
> And doing a simple redirect.
>
>  
>
> But, what I really want to do is make the URI cleaner so that the users don’t see the name of the program.
>
>  
>
> If I have a link in my code to:
>
>  
>
> /folder1/ServerName1/CustomerA
>
>  
>
> I would like them silently redirected to:
>
>  
>
> /folder1/detail.php?srv=ServerName1&cust=CustomerA
>
>  
In nutshell:

RewriteRule ^/folder1/(.*)/(.*)$ /folder1/detail.php?srv=$1&cust=$2 [L]

>
>  
>
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

 


[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