Solved

Masking URL in address bar for redirected page

Posted on 2008-06-23
7
1,302 Views
Last Modified: 2013-11-30
I have a domain where my main account is hosted  (astsolutions.co.za)

In this domain is a folder zimbabwe which supportzimbabwe.com points to.

If you goto supportzimbabwe.com it changes to astsolutions.co.za/zimbabwe which is where the site is, but I would like to keep that piece astsolutions.co.za/zimbabwe to read supportzimbabwe.com so it looks like a site on its own.

Many thanks
0
Comment
Question by:jinxster
7 Comments
 
LVL 7

Expert Comment

by:Chandan_Gowda
Comment Utility
0
 

Author Comment

by:jinxster
Comment Utility
Thank you for your trouble Chandan.

That question is more about developing a web browser control that displays another address in the URL bar.

The suggestion of a frame is a good one. I will try that and let you know.

Many thanks
0
 
LVL 16

Accepted Solution

by:
CWS (haripriya) earned 125 total points
Comment Utility
You can create a CNAME record in your DNS settings of the domain supportzimbabwe.com so that it points to the other website folder. This way the address bar shows only the website supportzimbabwe.com.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 4

Assisted Solution

by:snrudda
snrudda earned 125 total points
Comment Utility
If yo3 need to have supportzimbabwe.com in the browser address bar while display content of astsolutions.co.za/zimbabwe then frame should be the solution. But note hat address won't change as use: A4CA; any link on the page and, if the link have target attribute set you'll get new browser window with right path in its address bar.

You may also do some trick like put PHP script on your supportzimbabwe.com server, set it up as 404 error page for the supportzimbabwe.com site. The script should simple check the $_SERVER["REQUEST_URI"] variable and download appropriate page from interested URI from within astsolutions.co.za server, and output (after maybe a decent modification) to the client. Tricky way and I'd better not to use it but this will do the trick very good. Beware of DOS attacks!
0
 

Author Comment

by:jinxster
Comment Utility
Hi,

Thank you cyberwebservice and snrudda.

The frame idea kind of works as long as I pay for hosting account. My plan here was to not pay for the hosting account. The loss of the links are also not so nice, but I can live with that. (Bookmarking reasons)

So at this time I wont use frames thought it is a solution to this type of problem.

The CNAME also needs a hosted site and cannot be a parked domain (unless I am doing something wrong - possibly)

I did make progress on modding the .htaccess file. However I didnt succeed.

Attached my .htaccess file as it is now.

I don't know .htaccess error paths well enough so I dont know what to read into the situation that it does nothing.

I have also tried using the HTTP_REFERER variable, but no changes occured.

If anyone has any light on my htaccess configuration it would be appreciated. Do you think I should close this question and start a new one?

Thank you
# -FrontPage-

#Allow from all

#Allow from all

#Allow from all

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>

</Limit>

<Limit PUT DELETE>

</Limit>

php_flag register_globals off

AuthName astsolutions.co.za

AuthUserFile /usr/www/users/astsol/_vti_pvt/service.pwd

AuthGroupFile /usr/www/users/astsol/_vti_pvt/service.grp

Redirect permanent /public_html http://www.astsolutions.co.za/AST/
 

RewriteCond %{HTTP_HOST} astsolutions.co.za

RewriteCond %{REQUEST_URI} !^/AST

RewriteRule ^(.*)$ AST/$1 [L]
 

RewriteCond %{HTTP_HOST} supportzimbabwe.com

RewriteCond %{REQUEST_URI} !^zimbabwe

RewriteRule ^(.*)$ zimbabe/$1 [L]

Open in new window

0
 

Author Closing Comment

by:jinxster
Comment Utility
Many solutions to this problem. Both are correct though I wont use either. I will try an .htaccess mod rewrite.
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
Comment Utility
Thanks and Good luck :)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now