Set Up URL Masking On Your Site


At times, you may have a site created in a different location or directory and don’t want your visitors to see the full path to your files. Fortunately, with just some simple steps, you can set up URL masking to have your visitors see what you want them to see without having to show them the full URL where the files are actually located. You would merely need to follow these steps.

For this example, we will have domain.com show the contents of domain.net/sitefiles however, you can replace these domain names and URLs with your specific domain names and URLs.

  • You would first need to make sure that your site is loading perfectly at domain.net/sitefiles. If it is loading correctly, you should have no problems.
  • Create an index.html file in the public_html (or www) folder on your domain.com site. Also, be sure that there is not an “index.php” file in the same directory as that will take precedence over the index.html file you have created and load up when visitors access your site.
  • Add the following text to the index.html file
<html>
<head>
<title>www.domain.com</title>
 
</head>
<frameset rows="100%,*" border="0">
<frame src="http://domain.net/sitefiles/" frameborder="0" />
<frame frameborder="0" noresize />
</frameset>
</html>

What this will do is create a frame on the domain.com site that will fill the entire page. Then, when your visitors access domain.com, they will only see the content of domain.net/sitefiles.

And that’s it! You have now used a frame to mask your site files’ URL!


¿Le ha resultado útil este artículo?



  • How To Disable Nginx Caching

    Click Login to cPanel under the Actions Menu Navigate to the Files section and click on File Manager Click the Settings icon...

  • How to Redirect HTTP Requests to HTTPS

    Below we are going to show you how to redirect all non-https request to use https. Why would you do this? This depends on what kind of site you are ho...

  • Current Loaded Modules

    Below we have listed the Apache modules that are loaded on all of our services. Updated February 24th/2015 actions_module alias_module asis_module ...

  • Error Messages Overview

    Error 400: Bad RequestError 401: Authorization RequiredError 403: ForbiddenError 404: Page Not FoundError 405: Method Not AllowedError 406: Not Accept...

  • How to set your domain to redirect to WWW by default

    Add the below to your .htaccess file in order to have your-domain redirect to www.your-domain. Just make sure where it says “your-domain.comR...