•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Servers and Apache section within the Tech Talk category of DaniWeb, a massive community of 402,977 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,657 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Servers and Apache advertiser: Programming Forums
Views: 447 | Replies: 0
![]() |
•
•
Join Date: Jan 2008
Posts: 28
Reputation:
Rep Power: 1
Solved Threads: 3
Hello,
I need to hide an embedded directory in a URL site2.com/site2files/ <-- need to remove that and just see site2.com for the files in /site2files/
Here's a visual representation of my file system.
site1.com
Document root:
-file
-file.html
-folder/
-site2folder/ (Important!)
-file
-functions/ ::need to be accessed by site2
site2.com --if it wasnt auto re-routed to /site2folder/
Document root:
-file
-file.html
-folder/
-site2folder/
-file
-functions/ ::need to be accessed by site2
site2.com/site2folder/
site2folder:
-file.html
-folder/
-file
site1.com and site2.com both point to the same server.
I can't use virtual servers or mod_rewrite document root because I need the documents in site1.com accessible by site2.com
I have requests for site2.com rerouting to site2folder/ using php header("Location: and $_SERVER
I don't want my users to see site2.com/site2folder/ I want them to see site2.com/ and still access the files in /site2folder/. I was thinking mod_rewrite but I'm terrible at that..
Again I want to pretend like the directory doesn't exist and just use the top-level domain.
Thanks!
BTW
--I found this online and it DOESN'T work
Am I doing something wrong?
RewriteCond %{HTTP_HOST} ^(w{1,3}\.)?site2\.com$
RewriteCond $1 !^site2folder/
RewriteRule (.*) /site2folder/$1 [L]
I need to hide an embedded directory in a URL site2.com/site2files/ <-- need to remove that and just see site2.com for the files in /site2files/
Here's a visual representation of my file system.
site1.com
Document root:
-file
-file.html
-folder/
-site2folder/ (Important!)
-file
-functions/ ::need to be accessed by site2
site2.com --if it wasnt auto re-routed to /site2folder/
Document root:
-file
-file.html
-folder/
-site2folder/
-file
-functions/ ::need to be accessed by site2
site2.com/site2folder/
site2folder:
-file.html
-folder/
-file
site1.com and site2.com both point to the same server.
I can't use virtual servers or mod_rewrite document root because I need the documents in site1.com accessible by site2.com
I have requests for site2.com rerouting to site2folder/ using php header("Location: and $_SERVER
I don't want my users to see site2.com/site2folder/ I want them to see site2.com/ and still access the files in /site2folder/. I was thinking mod_rewrite but I'm terrible at that..
Again I want to pretend like the directory doesn't exist and just use the top-level domain.
Thanks!
BTW
--I found this online and it DOESN'T work
Am I doing something wrong?
RewriteCond %{HTTP_HOST} ^(w{1,3}\.)?site2\.com$
RewriteCond $1 !^site2folder/
RewriteRule (.*) /site2folder/$1 [L]
![]() |
•
•
•
•
•
•
•
•
DaniWeb Linux Servers and Apache Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: Apache VirtualHost IP-Based "Winodws"
- Next Thread: How much is too much


Linear Mode