homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
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

 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

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


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)

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.



 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.


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

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



 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