Apache Rewrite rule?

I want all request to:

http://www.t1shopper.com/cgi-bin/global.telecom.t1shopper.pl

To be redirected to:

http://www.t1shopper.com/tools/global.telecom.t1shopper2.php

And preserve the query string.

What's the rewrite rule that will do this?
Geoff MillikanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason MintonEpic ODBACommented:
ReWriteRule ^cgi-bin/global.telecom.t1shopper.pl(.*) tools/global.telecome.t1shopper2.php$1
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Geoff MillikanAuthor Commented:
Thanks for the fast post but it doesn't work.  The below configuration doesn't cause the rule to run.  It is still pulling up the old page.


<Directory /home/t1shopper/www/cgi-bin>
RewriteEngine On
RewriteOptions Inherit
ReWriteRule ^cgi-bin/global\.telecom\.t1shopper\.pl(.*) tools/global\.telecome\.t1shopper2\.php$1 [QSA]
</Directory>

Open in new window

0
Geoff MillikanAuthor Commented:
Changing the rule to look like this results in this entry in the error log:

script '/home/t1shopper/www/tools/global.telecome.t1shopper2.php' not found or unable to stat
<Directory /home/t1shopper/www/cgi-bin>
RewriteEngine On
RewriteOptions Inherit
RewriteBase   /tools
ReWriteRule ^global\.telecom\.t1shopper\.pl(.*) global\.telecome\.t1shopper2\.php$1 [QSA]
</Directory>

Open in new window

0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Geoff MillikanAuthor Commented:
Tried it with the "T" flag and no luck - still getting "unable to stat"
ReWriteRule ^global\.telecom\.t1shopper\.pl(.*) global\.telecome\.t1shopper2\.php$1 [QSA,T=application/x-httpd-php-source]

Open in new window

0
Geoff MillikanAuthor Commented:
Oh man, you've got to be kidding me!!  

In your solution above, you added an "e" in the name of the file I'm redirecting to.  I fixed the misspelling and my above solution works.
0
Geoff MillikanAuthor Commented:
You misspelled the solution which caused me grief but your solution helped me along the way.  Thank you.
0
Jason MintonEpic ODBACommented:
haha sorry...  my bad.  Also, I would normally just put that in .htaccess, but what you did is probably better.
0
Geoff MillikanAuthor Commented:
No worries, yah, having a .htaccess makes for a bunch of overhead.

Thanks again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.