You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Charles Payne (Travel Channel)" <ch...@travelchannel.com> on 2008/10/17 18:45:15 UTC
[users@httpd] [users@http]
Hi,
I am not sure if this is the list to post this too. But I am having an issue
with mod_rewrite. We are using Tomcat with Apache. We have a few site that
we are doing rewrites too. But we are having an issue were if one of our
vanity_rewrites are called on. An extra /domain rule is going added before
the url for the rewrite. I have found the rule for the rewrite it is this...
RewriteRule (.*)$ /domain$1 [PT,L]
Now if I remove that rule the vanity works, but all links on the domain.com
site don¹t. Again if that rule is try the vanity come out like this.
http://www.domain.com/domain/vanity_url
And we are getting a 404.
Is there anything I can try. I have search for a week now on google and
everything I have read or try has broke things.
Chuck
Re: [users@httpd] [users@http]
Posted by "Charles Payne (Travel Channel)" <ch...@travelchannel.com>.
Ok, sorry a bit slow. So that would be negative condition on the rewrite.
Would that be place in my httpd.conf for each vanity before the rewrite
rule? Like so...
RewriteCond %{http://www.domain.com/goodurl }
!http://www.domain.com/other_dir/good_url
RewriteRule (.*)$ /domain$1 [PT,L]
Or do I place that in the vanity.conf, I am only asking because I got about
500 of these. And I hate to make my httpd.conf get huge.
Thanks, I am going to trying that in the mean time with one vanity url.
Chuck
On 10/17/08 12:59 PM, "Eric Covener" <co...@gmail.com> wrote:
> On Fri, Oct 17, 2008 at 12:45 PM, Charles Payne (Travel Channel)
> <ch...@travelchannel.com> wrote:
>> > Hi,
>> >
>> > I am not sure if this is the list to post this too. But I am having an
>> issue
>> > with mod_rewrite. We are using Tomcat with Apache. We have a few site that
>> > we are doing rewrites too. But we are having an issue were if one of our
>> > vanity_rewrites are called on. An extra /domain rule is going added before
>> > the url for the rewrite. I have found the rule for the rewrite it is
>> this...
>> >
>> > RewriteRule (.*)$ /domain$1 [PT,L]
>> >
>> > Now if I remove that rule the vanity works, but all links on the domain.com
>> > site don't. Again if that rule is try the vanity come out like this.
>> >
>> > http://www.domain.com/domain/vanity_url
>> >
>> > And we are getting a 404.
>
>
> I don't fully follow what's going on, but you can short-circuit this
> rule with a rewritecond:
>
> RewriteCond %{REQUEST_URI} !vanity_url
> RewriteRule (.*)$ /domain$1 [PT,L]
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] [users@http]
Posted by Eric Covener <co...@gmail.com>.
On Fri, Oct 17, 2008 at 12:45 PM, Charles Payne (Travel Channel)
<ch...@travelchannel.com> wrote:
> Hi,
>
> I am not sure if this is the list to post this too. But I am having an issue
> with mod_rewrite. We are using Tomcat with Apache. We have a few site that
> we are doing rewrites too. But we are having an issue were if one of our
> vanity_rewrites are called on. An extra /domain rule is going added before
> the url for the rewrite. I have found the rule for the rewrite it is this...
>
> RewriteRule (.*)$ /domain$1 [PT,L]
>
> Now if I remove that rule the vanity works, but all links on the domain.com
> site don't. Again if that rule is try the vanity come out like this.
>
> http://www.domain.com/domain/vanity_url
>
> And we are getting a 404.
I don't fully follow what's going on, but you can short-circuit this
rule with a rewritecond:
RewriteCond %{REQUEST_URI} !vanity_url
RewriteRule (.*)$ /domain$1 [PT,L]
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org