Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
Apache Web Server
6:06 am May 2, 2026
This page requires javascript.
Forum Moderators:
phranque
Message Too Old, No Replies
Rewrite for use subdomain as master
webstyler
Msg#:4161153
8:13 am on Jun 29, 2010
(gmt 0)
So
I have a main site in www.example.com
I have develop new WP site on site.example.com (cpanel virtual subdomain)
Now, I would like that site.example.com resolve as www.example.com
any suggest ?
Thanks
webstyler
Msg#:4161157
8:22 am on Jun 29, 2010
(gmt 0)
uhm.. may be not clear :)
I need that when user digit www.example.com view site.example.com content
They must not redirect to /site but view as is www.example.com page..
so www.example.com/faq.html is really under site.example.com/faq
thanks
g1smd
Msg#:4161667
10:05 pm on Jun 29, 2010
(gmt 0)
What have you tried so far?
Are you on shared hosting?
webstyler
Msg#:4161884
6:24 am on Jun 30, 2010
(gmt 0)
solved with
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subdomain/$1
:)
g1smd
Msg#:4161895
7:12 am on Jun 30, 2010
(gmt 0)
VERY inefficient code that will beat your server hard drive to death very quickly.
Add the [L] flag to the Rule and check preceding forum topics for other ways to do this, ways that do not involve those expensive -f and -d "exists" checks.
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
April 2026 Google Search Observations
AdSense Earnings and Observations - April 2026
what do they want?
Hello again, it's been a while
I need some SEO help
SEO question
Do you get tired of others copying your content?
5 SEO Tips That Actually Worked for My Blog in 2026
Home
Forums Index
Server Side
/
Apache Web Server
6:06 am May 2, 2026