Hiding my website

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Hiding my website

Post by onion2k »

Ok, I don't mean hiding it completely.. that'd be silly.

I want my users to see http://www.domain.com/index.php .. but in reality the page is http://www.domain.com/v_1_21/index.php .. ideas? I need to have versions of the site I can switch between very easily. I don't have access to the httpd.conf file to change the virtual host directory .. but I can play with .htaccess to my heart's content.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

if they allow overrides, mod_rewrite, or have index.php just decide which page to show, then include it

From the way you worded your question mod_rewrite or some other kind of URL rewriting tool is what you want, virtualhosts / alias is probably better though
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Another option is to make a symlink to the real file ;)

Eg: pubwww dir is configured to be under /home/timvw/services/www
I have all my pages in /home/timvw/src/timvw.madoka.be

If i want to switch to the pages in /home/timwv/src/test.site i simply change the symlink...
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

I have all my domains with 123-reg, and they allow web forwarding setup from within the cpanel. From there you can choose non-framed forwarding, framed web forwarding, framed web forwarding to a single page, etc.

I think you would want to choose framed web forwarding, that's what I use for all my sub dir's that I want to look like real domains.

Obviously your domain provider might not offer these services, but mine does so I presume you're in with a chance :)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

For what you're describing I go with what timvw says.... a symlink.

Code: Select all

ln -s /path/to/current/dir    /path/to/false/dir
Depending upon what's in httpd.conf you may need to set the "Option" "Follow-symlinks" to On in .htaccess ;)
Post Reply