You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by thomas Armstrong <ta...@gmail.com> on 2007/06/01 19:25:07 UTC

Re: [users@httpd] Problems with an extra Rewrite Rule before a RewriteCond

Thank you everybody.

However I'm still gettint the same odd effect. I tried:
RewriteRule ^faq index.php?page_id=119 [R,L] ---> it doesn't mask the URL
RewriteRule ^faq index.php?page_id=119 [R,TP] --> Internal server error
RewriteRule ^faq index.php?page_id=119 --> it's caught by index.php, I suppose

I also tried by editting it on 'httpd.conf':
RewriteRule http://myblog.com/faq http://myblog.com/index.php?page_id=119 [R,L]
..

But I'm not sure Apache is taking it into account. :(

On 5/30/07, Vincent Bray <no...@gmail.com> wrote:
> On 30/05/07, Russ <rs...@istandfor.com> wrote:
> > I'm a bit confused.  R means redirect, meaning the server sends the 301 or 302 header to the browser.  In either case, the browse will redirect to the new URL and that's what will show in the address bar.  How evactly do you make things redirect without proxying and without a change in the address bar?
>
> Do as Joshua pointed out. First try without any flags at all, and in
> case that doesn't work try with [PT].
>
> I expect you won't need any flags.
>
> --
> noodl
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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] Problems with an extra Rewrite Rule before a RewriteCond

Posted by Joshua Slive <jo...@slive.ca>.
On 6/1/07, thomas Armstrong <ta...@gmail.com> wrote:
> Thank you everybody.
>
> However I'm still gettint the same odd effect. I tried:
> RewriteRule ^faq index.php?page_id=119 [R,L] ---> it doesn't mask the URL
> RewriteRule ^faq index.php?page_id=119 [R,TP] --> Internal server error
> RewriteRule ^faq index.php?page_id=119 --> it's caught by index.php, I suppose

As you've been told repeatedly, you can't use "R" if you don't want
the browser to see the new URL.

So the only one of those that makes any sense at all is the last one.
But what the heck does "It's caught by index.php" mean? Isn't that the
idea? What exactly happens?

>
> I also tried by editting it on 'httpd.conf':
> RewriteRule http://myblog.com/faq http://myblog.com/index.php?page_id=119 [R,L]

That's a garbage config. Where did you get that from. Something closer would be
RewriteRule ^/faq /index.php?page_id=119 [L]
and perhaps better
RewriteRule ^/faq /full/path/to/index.php?page_id=119 [L]

If you still can't get it to work, you MUST use the RewriteLog to
debug your problems. Using mod_rewrite with the RewriteLog is just
flailing in the dark.

Joshua.

---------------------------------------------------------------------
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