Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Help with ReWrite Rule |
|
Author |
|
ediruzza
Joined: 30 Mar 2007 Posts: 2
|
Posted: Fri 30 Mar '07 1:23 Post subject: Help with ReWrite Rule |
|
|
We've been racking our heads trying to figure out what the syntax should be for this ReWrite Rule...
Here's what we are trying to do.
- We have a secured domain - it's called "https://ssl.mydomain.com"
- All the code for the domain is in the directory "f:/webstuff/code"
- There are additional folders beneath the 'code' folder (up to 5 levels deep)
So far, pretty simple...
- We are setting up clients with their own login in name, i.e. client1, client2, client3, etc.
- We would like to trap the clients name within the URL, however, we still want to redirect them to the main directory "F:/webstuff/code"
- Basically, the URL would look something like this for the above clients.
"https://ssl.mydomain.com/client1/index.php"
"https://ssl.mydomain.com/client2/index.php"
"https://ssl.mydomain.com/clientN/index.php"
- Obviously, we don't want to create a 'clientN' folder for each client.
- We just want to redirect them back to the main folder.
Here's what we have in the ssl.conf file. (we are running Apache 2.0.37)
RewriteEngine On
RewriteRule (.*)/(.*) f:/webstuff/code/$2
The problem with this code is that any attempt to get past the 'code' folder results in an error 404.
So, "https://ssl.mydomain.com/client1/index.php" works...but,
"https://ssl.mydomain.com/client1/test/index.php" does not work...
I'm sure this is pretty simple...but we are new at this...
Thanks in advance to anyone who can help.
Ed |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
ediruzza
Joined: 30 Mar 2007 Posts: 2
|
Posted: Fri 30 Mar '07 16:18 Post subject: |
|
|
Thanks,
I'll check over there... |
|
Back to top |
|
|
|
|
|
|