Masking URL question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Masking URL question

Post by Charles256 »

Okay. Let me try to explain this as best as I can. Anyone ever played hyperiums or any other online game? Notice how they have a thing of making the URL read the directory no matter what.. example:
http://www.hyperiums.com/servlet

now i click a link on the page called http://www.hyperiums.com/servlet/some/f ... understand
and it still reads http://www.hyperiums.com/servlet

how the hell do they do that? Thanks for any ideas.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

dont really understand what you mean. i know that if you go to your domain control panel you can set it as a web forwarding domain and then choose framed forwarding, framed forwarding to a single page, unframed.... etc, etc.

maybe that is what you are trying to achieve?
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

no. i'm essentially trying to mask the URL. so that no matter what actual page the person is on it still just reads the main domain name.
User avatar
shoebappa
Forum Contributor
Posts: 158
Joined: Mon Jul 11, 2005 9:14 pm
Location: Norfolk, VA

Post by shoebappa »

Usually Apache mod_rewrite: http://www.phpfreaks.com/tutorials/23/0.php

I think in the above case it's just the way the java app server works. I'm not a Java person though.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

ah.so i'd have to be running me own server.darn. thanks though! :-D
User avatar
shoebappa
Forum Contributor
Posts: 158
Joined: Mon Jul 11, 2005 9:14 pm
Location: Norfolk, VA

Post by shoebappa »

Sometimes you can use .htaccess files to put mod_rewrite rules in on a shared hosting server. If they're running Apache and allow it.
Post Reply