Re: [users@httpd] mod rewrite

2012-11-26 Thread Steffan A. Cline
On the rewrite rule, I was working on RewriteRule ([\w]*)\.(.*) http://domain.com/$1-$2/ BUT what if there is anything before xxx.com like www.xxx.com? I am no pro with regex but trying to find a way around that. Thanks Steffan On 11/26/12 10:46 AM, "Steffan A. Cline" wrote: > Igor, > >

Re: [users@httpd] mod rewrite

2012-11-26 Thread Steffan A. Cline
Igor, I am not sure what you mean. The ?domain=xxx.com option works great. I was just wondering if there was a way to change it from ?domain=xxx.com to /xxx-com/ simply changing the . to a - Is it possible? I didn't know if it was possible to put that into a regex replacement of a sort. Thank

Re: [users@httpd] mod rewrite

2012-11-25 Thread Igor Cicimov
On 26/11/2012 4:17 PM, "Steffan A. Cline" wrote: > > Is there a way to rewrite the HTTP_HOST where the . Is changed to a - ? > > HTTP_HOST= something.com > Redirects to domain.com/something-com/ > > Is it possible? There is nothing to rewrite here. You need to do what you already said above, redi

Re: [users@httpd] mod rewrite

2012-11-25 Thread Steffan A. Cline
Is there a way to rewrite the HTTP_HOST where the . Is changed to a - ? HTTP_HOST= something.com Redirects to domain.com/something-com/ Is it possible? Thanks Steffan On 11/8/12 11:38 PM, "Igor Cicimov" wrote: > RewriteEngine On > RewriteCond %{HTTP_HOST} !^(www\.)?domain.com

Re: [users@httpd] mod rewrite

2012-11-08 Thread Igor Cicimov
RewriteEngine On RewriteCond %{HTTP_HOST} !^(www\.)?domain.com $ [NC] RewriteRule .* http://domain.com?domain=%{HTTP_HOST} [R,L] On Fri, Nov 9, 2012 at 3:36 PM, Steffan A. Cline wrote: > Works a charm with one exception. > > www.domain.com redirects to domain.com?domain=www

Re: [users@httpd] mod rewrite

2012-11-08 Thread Igor Cicimov
RewriteEngine On RewriteCond %{HTTP_HOST} !^(www\.)?domain.com $ [NC] RewriteRule .* http://domain.com?domain=%{HTTP_HOST} [R,L] On Fri, Nov 9, 2012 at 3:48 PM, Steffan A. Cline wrote: > Cancel that… Thanks Igor. Here is what I have and it works great!! > > > RewriteCond %{HT

Re: [users@httpd] mod rewrite

2012-11-08 Thread Steffan A. Cline
Cancel thatŠ Thanks Igor. Here is what I have and it works great!! RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ http://domain.com$1 [R=301,L] RewriteCond %{HTTP_HOST} !^namedeli.com$ [NC] RewriteRule .* http://domain.com/?domain=%{HTTP_HOST} [R,L] Thanks Steffan On 11/8

Re: [users@httpd] mod rewrite

2012-11-08 Thread Steffan A. Cline
Works a charm with one exception. www.domain.com redirects to domain.com?domain=www.domain.com Anyway to fix that? www.domain.com should be ignored since that is the domain itself. Thanks Steffan On 11/8/12 7:24 PM, "Igor Cicimov" wrote: > RewriteEngine On > RewriteCond %{HTTP_HOST} !^d

Re: [users@httpd] mod rewrite

2012-11-08 Thread Steffan A. Cline
I'll give this a shot! Thank you, Igor! Thanks Steffan On 11/8/12 7:24 PM, "Igor Cicimov" wrote: > RewriteEngine On > RewriteCond %{HTTP_HOST} !^domain.com $ [NC] > RewriteRule .* http://domain.com?domain=%{HTTP_HOST} [R,L] > > > On Fri, Nov 9, 2012 at 1:05 PM, Stef

Re: [users@httpd] mod rewrite

2012-11-08 Thread Igor Cicimov
RewriteEngine On RewriteCond %{HTTP_HOST} !^domain.com$ [NC] RewriteRule .* http://domain.com?domain=%{HTTP_HOST} [R,L] On Fri, Nov 9, 2012 at 1:05 PM, Steffan A. Cline wrote: > Thanks for the URL. I did not read this one, but a similar one also on the > site. > > I did not blindly ask for sugg

Re: [users@httpd] mod rewrite

2012-11-08 Thread Steffan A. Cline
Thanks for the URL. I did not read this one, but a similar one also on the site. I did not blindly ask for suggestions without trying it first. The issue I ran into was too many redirects. Clearly I didn't get it right and hoped someone may have something worth trying. Thanks Steffan On 11/8/

Re: [users@httpd] mod rewrite

2012-11-08 Thread Igor Cicimov
On Fri, Nov 9, 2012 at 9:59 AM, Steffan A. Cline wrote: > I am trying to figure out a specific rewrite. > > I have a default host set up to catch any domains not served on the > specific server. > > I am trying to direct unknown domains in a manner such as : > > default domain would be domain.com

[users@httpd] mod rewrite

2012-11-08 Thread Steffan A. Cline
I am trying to figure out a specific rewrite. I have a default host set up to catch any domains not served on the specific server. I am trying to direct unknown domains in a manner such as : default domain would be domain.com So, abc.com hits, it would be rewritten to http://domain.com?domain

RE: [users@httpd] mod rewrite question https to http

2012-02-02 Thread Roland RoLaNd
Thank you for your help.is there any ebook you advise me to read to catch up on the below ? Date: Thu, 2 Feb 2012 07:04:06 -0200 From: imed...@grosshat.com To: users@httpd.apache.org Subject: Re: [users@httpd] mod rewrite question https to http Hi Roland, on the context of SSL Virtual Host

Re: [users@httpd] mod rewrite question https to http

2012-02-02 Thread Iñigo Medina
Hi Roland, on the context of SSL Virtual Host put the following rewrite rules: RewriteEngine On RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} iñigo On Wed, 1 Feb 2012, Roland RoLaNd wrote: Dear all, I'm a complete newbie to apache and i've inherited a virtual h

Re: [users@httpd] mod rewrite question https to http

2012-02-01 Thread Igor Cicimov
Put the last rewrite rule inside your ssl virtual host and change https to http. On Feb 2, 2012 12:29 AM, "Roland RoLaNd" wrote: > Dear all, > > I'm a complete newbie to apache and i've inherited a virtual host setup. > i have the need to redirect all traffic from https to http (443 to 80, yes >

[users@httpd] mod rewrite question https to http

2012-02-01 Thread Roland RoLaNd
Dear all, I'm a complete newbie to apache and i've inherited a virtual host setup.i have the need to redirect all traffic from https to http (443 to 80, yes that is correct) the relevant rewrite rules in httpd.conf are as such: # all other traffic is redirected to the SSL siteRewriteEng

Re: [users@httpd] Mod-ReWrite

2011-09-24 Thread Mark Montague
On September 24, 2011 23:04 , Suneet Shah wrote: I tried to add another parameter to the query string and now the different parameters are getting merged together I am not sure if my error is in the RewriteCond or in the ReWriteRule. Any ideas? URL -> http://localhost/test_rpc/header.jsp?tkn=

Re: [users@httpd] Mod-ReWrite

2011-09-24 Thread Suneet Shah
Sorry, please disregard my question. I found my error. On Sat, Sep 24, 2011 at 11:04 PM, Suneet Shah wrote: > I tried to add another parameter to the query string and now the different > parameters are getting merged together > I am not sure if my error is in the RewriteCond or in the ReWriteRu

Re: [users@httpd] Mod-ReWrite

2011-09-24 Thread Suneet Shah
I tried to add another parameter to the query string and now the different parameters are getting merged together I am not sure if my error is in the RewriteCond or in the ReWriteRule. Any ideas? URL -> http://localhost/test_rpc/header.jsp?tkn=xyz&userid=mylogin HEADERS PASSED: tkn: xyz;var2:mylog

Re: [users@httpd] Mod-ReWrite

2011-09-24 Thread Suneet Shah
Mark, Many thanks for your help. This now works Suneet On Sat, Sep 24, 2011 at 10:33 PM, Mark Montague wrote: > On September 24, 2011 22:23 , Suneet Shah > wrote: > >> I made the change that you described below. Now the tkn header is coming >> in as null. Have I made an error in assigning

Re: [users@httpd] Mod-ReWrite

2011-09-24 Thread Mark Montague
On September 24, 2011 22:23 , Suneet Shah wrote: I made the change that you described below. Now the tkn header is coming in as null. Have I made an error in assigning the tkn to var1? URL -> http://localhost/test_rpc/header.jsp?tkn=abc Header value -> tkn: (null) RewriteCond %{QUERY_STRING

Re: [users@httpd] Mod-ReWrite

2011-09-24 Thread Suneet Shah
Hi, thanks very much for your help with this. I am a bit unclear in how information is assigned to variables and how they can be passed from one directive to another. I made the change that you described below. Now the tkn header is coming in as null. Have I made an error in assigning the tkn t

Re: [users@httpd] Mod-ReWrite

2011-09-24 Thread Mark Montague
On September 24, 2011 16:06 , Suneet Shah wrote: I have the following url: http://localhost/test_rpc/header.jsp?tkn=abc In my httpd.conf I added the following: RewriteEngine on Options +FollowSymLinks RewriteCond %{QUERY_STRING} tkn=(.*) RewriteRule ^/test_rpc/$ [E=var1:%1] RequestHeader appe

Re: [users@httpd] Mod-ReWrite

2011-09-24 Thread Suneet Shah
Hi, i am still having some problem with getting this to work. I am not getting the value that is in the query string to appear in the header. Any ideas on what I am doing wrong? I have the following url: http://localhost/test_rpc/header.jsp?tkn=abc In my httpd.conf I added the following: Rewri

Re: [users@httpd] Mod Rewrite for Server Status 503, depending upon URL

2011-09-19 Thread Ujjwal Kumar
Thanks Pete. It worked perfectly!! :) On Sat, Sep 17, 2011 at 8:25 PM, Pete Houston wrote: > Untested, but: > > >ServerName www.mysite.com > >ErrorDocument 503 http://www.mypartnersite.com/books > > >ErrorDocument 503 http://www.my

Re: [users@httpd] Mod Rewrite for Server Status 503, depending upon URL

2011-09-17 Thread Pete Houston
Untested, but: ServerName www.mysite.com ErrorDocument 503 http://www.mypartnersite.com/books ErrorDocument 503 http://www.mypartnersite.com/music ... should do what you describe. Pete On Sat, Sep 17, 2011 at

Re: [users@httpd] Mod Rewrite for Server Status 503, depending upon URL

2011-09-17 Thread Ujjwal Kumar
/music is not a directory, it is just a URL which is routed to some specific JSP (bound with a struts action), through struts.xml and urlrewrite.xml (using tuckey). I am restating the problem with more clarity. Lets say we have 2 sites www.mysite.com and www.mypartnersite.com mysite deals with b

Re: [users@httpd] Mod Rewrite for Server Status 503, depending upon URL

2011-09-16 Thread Mark Montague
On September 16, 2011 2:58 , Ujjwal Kumar wrote: * /music is not a physical directory What is /music? Is this URL proxied? Is the content for this URL generated by a script? Something else? * In one sentence, the problem is to redirect specific urls (a) to a page only if that

[users@httpd] Mod Rewrite for Server Status 503, depending upon URL

2011-09-16 Thread Ujjwal Kumar
I want to redirect only if there is an error (server status 503). Without the error, this is the redirect script, which works fine: Redirect /music http://google.com/music Redirect /talk http://pidgin.com/some_gtalk_url But, this redirects /music to http:// google.co/music in all cases. I want th

Re: [users@httpd] mod rewrite FQDN of HTTP request ?

2005-05-25 Thread Davide Bianchi
Netops wrote: > I am hoping to use mod rewrite and change the FQDN in the HTTP request. > Is this possible ? I thought it would be REQUEST_URI but it is not, I > tried changing HTTP_HOST but that seems to affect the reply to the client. It won't work. MS CRM will also put the FQDN in every single

[users@httpd] mod rewrite FQDN of HTTP request ?

2005-05-25 Thread Netops
Hello, Currently we have a internal IIS server with Microsoft CRM that has been configured to listen for web.blank.domain.com. We would like to make this page avaiable over SSL to external users but Microsoft has documentated that the application will not run over internet connections only loca