Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 11th, 2001, 12:12 PM
joeygambino joeygambino is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 1 joeygambino User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

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?

Reply With Quote
  #2  
Old April 11th, 2001, 04:43 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #3  
Old April 12th, 2001, 03:17 AM
carpediem-it carpediem-it is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 56 carpediem-it User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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

Reply With Quote
  #4  
Old April 12th, 2001, 03:40 PM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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>

Reply With Quote
  #5  
Old April 12th, 2001, 04:29 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #6  
Old April 12th, 2001, 07:31 PM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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

Reply With Quote
  #7  
Old April 14th, 2001, 12:30 PM
beardo's Avatar
beardo beardo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: Cheltenham, UK
Posts: 197 beardo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 14 h 11 m 13 sec
Reputation Power: 8
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > URL Redirection/Masking/Cloaking


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway