mod rewrite

This is a discussion on mod rewrite within the Apache Web Server forums, part of the Web Server and Related Forums category; Take this URL, http://example.org/SOME_REQUEST_HERE I want to check if SOME_REQUEST_HERE is a directory (-d) or not, if ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-09-2006
bryan
 
Posts: n/a
Default mod rewrite

Take this URL, http://example.org/SOME_REQUEST_HERE
I want to check if SOME_REQUEST_HERE is a directory (-d) or not, if it
is, go to it, if it isn't, then rewrite it like this
RewriteRule ^([^/]+)?$ index.php?request=$1

what I have now is this...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)?$ index.php?request=$1

when I echo the $_GET array (using PHP)
I have an array that looks like this...
array (
users = index.php
)
that's not what I want... I want users = SOME_REQUEST_HERE any help is
appreciated thanks.

  #2 (permalink)  
Old 05-09-2006
Robert Ionescu
 
Posts: n/a
Default Re: mod rewrite

bryan wrote:
> users = index.php


Exclude the period of tghe RegEx, if you can. That would be the easiest way.

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/.]+)$ /index.php?request=$1 [L]

--
Robert
  #3 (permalink)  
Old 05-10-2006
bryan
 
Posts: n/a
Default Re: mod rewrite

Thanks robert.

  #4 (permalink)  
Old 05-10-2006
bryan
 
Posts: n/a
Default Re: mod rewrite

this still doesn't work, it gives me an error

  #5 (permalink)  
Old 05-10-2006
Robert Ionescu
 
Posts: n/a
Default Re: mod rewrite

bryan wrote:
> this still doesn't work, it gives me an error


Which error? What can you find in your RewriteLog (needs to be enabled
first)?

--
Robert
  #6 (permalink)  
Old 05-10-2006
bryan
 
Posts: n/a
Default Re: mod rewrite

Nevermind, I found the problem.

  #7 (permalink)  
Old 05-10-2006
Bob
 
Posts: n/a
Default Re: mod rewrite

On 2006-05-10 02:00:36 -0700, Robert Ionescu <robsiegen@googlemail.com> said:

> bryan wrote:
>> this still doesn't work, it gives me an error

>
> Which error? What can you find in your RewriteLog (needs to be enabled first)?


how do I enable the Rewritelog? am I able to generate a proxy log, too?

thanks!
b

  #8 (permalink)  
Old 05-11-2006
Robert Ionescu
 
Posts: n/a
Default Re: mod rewrite

Bob wrote:
> how do I enable the Rewritelog?


With
RewriteLog logs/rewrite.log
RewriteLoglevel 5

> am I able to generate a proxy log, too?


The new mod_proxy versions (2.2 branch) should log something into the
error.log, if you set the Loglevel directive from e.g. error to debug.

--
Robert
  #9 (permalink)  
Old 05-12-2006
Bob
 
Posts: n/a
Default Re: mod rewrite

On 2006-05-10 23:41:14 -0700, Robert Ionescu <robsiegen@googlemail.com> said:

> Bob wrote:
>> how do I enable the Rewritelog?

>
> With
> RewriteLog logs/rewrite.log
> RewriteLoglevel 5
>
>> am I able to generate a proxy log, too?

>
> The new mod_proxy versions (2.2 branch) should log something into the
> error.log, if you set the Loglevel directive from e.g. error to debug.


this is totally helpful, thanks!

I probably don't need the proxy log (famous last words), but any way to
get such a log in Apache 2.0.x?

this is gravy, the rewrite log will make things seriously easier for me
next week, at the client site.

thanks much!
b.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:55 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0