homepage Welcome to WebmasterWorld Guest from 50.19.172.0
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
mod rewrite help please
BassTeQ2

5+ Year Member



 
Msg#: 3602513 posted 3:08 am on Mar 17, 2008 (gmt 0)

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

 

jdMorgan

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



 
Msg#: 3602513 posted 5:58 pm on Mar 17, 2008 (gmt 0)

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

BassTeQ2

5+ Year Member



 
Msg#: 3602513 posted 12:58 am on Mar 18, 2008 (gmt 0)

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.

BassTeQ2

5+ Year Member



 
Msg#: 3602513 posted 1:21 am on Mar 18, 2008 (gmt 0)

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

Cheers

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3602513 posted 2:35 am on Mar 18, 2008 (gmt 0)

How did you fix it?

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved