|
Home > Archive > Apache Server configuration support > June 2007 > mod_rewrite question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
mod_rewrite question
|
|
|
| Let's say I've got a site for which I want to do rewriting for all
requests to a particular subdirectory and everything beneath it. For
sake of example, we'll use "mydir" as the name of the directory.
Further, I need the rewrite condition to be case-insensitive so that
the condition does catch someone doing http://mysite.com/MyDir and
other variations.
I tried this, but it doesn't seem to be working correctly. That is,
it works for http://mysite.com/mydir but I get a 404 for http://mysite.com/MyDir
RewriteCond %{DOCUMENT_ROOT}mydir%{REQUEST_FILENAME} [NC]
Any suggestions?
Any help would be appreciated.
Thanks,
Sean
| |
| shimmyshack 2007-06-22, 1:26 pm |
| On Jun 22, 5:01 pm, Sean <seanmichaelbr...@gmail.com> wrote:
> Let's say I've got a site for which I want to do rewriting for all
> requests to a particular subdirectory and everything beneath it. For
> sake of example, we'll use "mydir" as the name of the directory.
> Further, I need the rewrite condition to be case-insensitive so that
> the condition does catch someone doinghttp://mysite.com/MyDirand
> other variations.
>
> I tried this, but it doesn't seem to be working correctly. That is,
> it works forhttp://mysite.com/mydirbut I get a 404 forhttp://mysite.com/MyDir
>
> RewriteCond %{DOCUMENT_ROOT}mydir%{REQUEST_FILENAME} [NC]
>
> Any suggestions?
>
> Any help would be appreciated.
>
> Thanks,
>
> Sean
Have you read the manual pages for rewrite, the condition you use
doesnt appear to be "standard",
RewriteCond ^/mydir [NC]
would be.
| |
| shimmyshack 2007-06-22, 1:26 pm |
| On Jun 22, 5:01 pm, Sean <seanmichaelbr...@gmail.com> wrote:
> Let's say I've got a site for which I want to do rewriting for all
> requests to a particular subdirectory and everything beneath it. For
> sake of example, we'll use "mydir" as the name of the directory.
> Further, I need the rewrite condition to be case-insensitive so that
> the condition does catch someone doinghttp://mysite.com/MyDirand
> other variations.
>
> I tried this, but it doesn't seem to be working correctly. That is,
> it works forhttp://mysite.com/mydirbut I get a 404 forhttp://mysite.com/MyDir
>
> RewriteCond %{DOCUMENT_ROOT}mydir%{REQUEST_FILENAME} [NC]
>
> Any suggestions?
>
> Any help would be appreciated.
>
> Thanks,
>
> Sean
well it would if I got it right first time
ReWriteCond %{REQUEST_URI} ^/mydir [NC]
|
|
|
|
|