Solved

Masking URL in address bar for redirected page

Posted on 2008-06-23
7
1,303 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
ID: 21844215
0
 

Author Comment

by:jinxster
ID: 21844286
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
ID: 21844462
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 4

Assisted Solution

by:snrudda
snrudda earned 125 total points
ID: 21855461
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
ID: 21883158
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
ID: 31471340
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)
ID: 21883298
Thanks and Good luck :)
0

Featured Post

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

867 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

12 Experts available now in Live!

Get 1:1 Help Now