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.
_______________________________________________________________________
Stanley Martin
System Administrator | IM DCS US Wintel Server Team | Outsourcing Services
Capgemini "US" | KCSC Service Center
Tel.: (816) 347-7692 – Mob.: (816) 284-7415
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.