|
Home > Archive > Apache Server configuration support > June 2007 > simple directory rewriting 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 |
simple directory rewriting question
|
|
| laredotornado@zipmail.com 2007-06-14, 7:25 pm |
| Hi, I'm using Apache 2 on Linux. I have mod_rewrite in the
installation. How would I rewrite URLs of the form
/maindir/old_dir/subdir1/subdir2/file
to
/maindir/new_dir/subdir1/subdir2/file
What I'm basically asking is how do I have all URLs with "/old_dir"
translated to "/new_dir" before the paths are resolved?
Thanks, - Dave
| |
| shimmyshack 2007-06-14, 7:25 pm |
| On Jun 14, 9:55 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.com> wrote:
> Hi, I'm using Apache 2 on Linux. I have mod_rewrite in the
> installation. How would I rewrite URLs of the form
>
> /maindir/old_dir/subdir1/subdir2/file
>
> to
>
> /maindir/new_dir/subdir1/subdir2/file
>
> What I'm basically asking is how do I have all URLs with "/old_dir"
> translated to "/new_dir" before the paths are resolved?
>
> Thanks, - Dave
rewrites rewrite urls, you need an alias
Alias /maindir/old_dir/ /maindir/new_dir/
| |
| shimmyshack 2007-06-14, 7:25 pm |
| On Jun 15, 1:06 am, shimmyshack <matt.fa...@gmail.com> wrote:
> On Jun 14, 9:55 pm, "laredotorn...@zipmail.com"
>
> <laredotorn...@zipmail.com> wrote:
>
>
>
>
>
>
> rewrites rewrite urls, you need an alias
> Alias /maindir/old_dir/ /maindir/new_dir/
ignore that - sorry that was a load of rubbish!
you need a symlink and to add FollwSymLinks to your options.
of course if you are actually talking about
http://server.com/maindir/old_dir/subdir1/subdir2/file
then you _can_ use rewrites
also you _could_ just move the stuff
|
|
|
|
|