|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
I'm new to URL redirection. I've figured out the actual redirection part itself, but I'd like to know how I can hide the URL I'm redirecting to. If someone puts in URL and it goes to subdomain.domain.com, I'd like it to still show URL in the address bar. How can this be done?
|
|
#2
|
|||
|
|||
|
If they are on the same server:
(This is so-called internal redirect) RewriteEngine on RewriteRule ^/icons/(.+) - [PT,L] RewriteRule ^/(.*) /system/path/to/docroot/of/subdomain/domain.com/$1 If subdomain is on another server: RewriteEngine on RewriteRule ^/icons/(.+) - [PT,L] RewriteRule ^/(.*) http://subdomain.domain.com/$1 [P,L] Last edited by freebsd : April 12th, 2001 at 05:34 AM. |
|
#3
|
|||
|
|||
|
The basic way is using frames, they put the site in a frame thats set to 100%
Not ideal but works, the other way is using the server and run a proxy server but this uses a lot of BW so you have to allow for this in your pricing Regards Darren
__________________
HTTP://WWW.PHP4HOSTING.COM ($) HTTP://WWW.PHP4HOSTING.CO.UK (£) Website Hosting from $4.80/£3pm -- .COM/.NET $39.98/£24.99 PHP4, MySQL (Root Access), Full CGI-BIN, Shell Access, FTP, POP3, WAP Full Control Reseller Accounts, unlimited domains, FTP, POP, MySQL,PHP4 |
|
#4
|
||||
|
||||
|
the easiest way is using frames (as described in Darrens reply), but it is still possible to see the location of the page using the right mouse button.
If you want to disable the right mouse button (and thus prevent users from stealing your images or viewing the location of the page) you should use the following script (put it in the <head></head>): <SCRIPT language=JavaScript> var message="Sorry, it is not allowed to use your right mouse button."; function click(e) { if (document.all) { if (event.button == 2) { alert(message); return false; } } if (document.layers) { if (e.which == 3) { alert(message); return false; } } } if (document.layers) { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=click; // --> </script> |
|
#5
|
|||
|
|||
|
Using frame or javascript is quick and easy but not reliable as that depends on the client's browser. Futher, if the redirect URL target must be hidden, using frame or javascript doesn't work, there are many ways to find out the target URL.
Since you posted this to Apache forum here (not to JavaScript forum nor HTML forum), I assumed you wanted to handle this on the server side and not client dependent at all. So just use the appropriate rewrite rules that I posted. Unlike what Darren told you that you must run a proxy server, the 2nd ruleset is like a proxy request but you don't need to be running a proxy server at all. |
|
#6
|
||||
|
||||
|
Hi,
I think freeBSD (man i love that OS!) is right. I never had the same problem you have at the moment, but i would solve it the way mr. freeBSD suggests. However, when it is not so very important it might be tempting to use the easy way... Good luck, Bizzk |
|
#7
|
||||
|
||||
|
mod rewrite
I see you are tryign to do the same as me!
See : http://httpd.apache.org/docs/vhosts/mass.html Then read my post, perhaps we can both have a headache on the same subject! ![]() http://forums.devshed.com/showthrea...&threadid=13514 Beardo |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > URL Redirection/Masking/Cloaking |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|