Welcome to WebmasterWorld Guest from 54.145.136.73

Forum Moderators: Ocean10000 & incrediBILL & phranque

mod rewrite help please

   
3:08 am on Mar 17, 2008 (gmt 0)

5+ Year Member



Hi all, I'm trying to redirect a request to another server if the querystring contains a keyword, "transformation"
I have my .htaccess setup as follows

RewriteEngine on
RewriteCond %{QUERY_STRING} transformation
RewriteRule (.*) [new-machine:8080...] [R=Permanent]

Now this works if I make a request from the htdocs dir eg
[old-machine...]

BUT when I try a request from the cgi bin, nothing happens
eg.

[new-machine...]

Any idea why this doesnt work for the cgi-bin?

Any help would be greatly appreciated.

Thank you

5:58 pm on Mar 17, 2008 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Is the cgi-bin a "real" subdirectory below the directory in which this .htaccess code resides?

If it is actually elsewhere in the filesystem, and is simply Aliased (see mod_alias) or ScriptAliased to appear to be in your directory structure, then your .htaccess won't necessarily apply when it's requested via HTTP.

Jim

12:58 am on Mar 18, 2008 (gmt 0)

5+ Year Member



Hi Jim, thanks very much for your reply.
Its a standard apache install, so the cgi-bin lives below the htdocs directory and is ScriptAilased to be in the directory structure.

Even if I copy the .htaccess file into the cgi-bin from htdocs it still doesn't work.

1:21 am on Mar 18, 2008 (gmt 0)

5+ Year Member



I've managed to get it working now, thanks again for your help!

Cheers

2:35 am on Mar 18, 2008 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



How did you fix it?

Might be useful to the next person with the same question...

 

Featured Threads

Hot Threads This Week

Hot Threads This Month