What is URL masking?
A URL is a web address. With masking, a visitor types yourdomain.com/shop, but the page really comes from another folder or site. The address bar still shows the first one. This is different from a redirect, which changes the address bar to the new place.
The .htaccess file is a small settings file for Apache web servers. It sits in your website folder. Rules inside it use a tool called mod_rewrite, which rewrites addresses. Ask Hostvento support if your plan does not use Apache.
Warning: a mistake in .htaccess can show a "500 error" on your whole site. Back up the file first.
Steps
- Log in to your control panel and open the File Manager.
- Go to your website folder, often
public_html. - Click Settings and tick Show Hidden Files, because .htaccess starts with a dot.
- Right-click
.htaccessand choose Copy to make a backup. If the file does not exist, create it. - Right-click the original and choose Edit.
Example 1: Mask a folder
Show the content of /pages/about-us at /about:
RewriteEngine On
RewriteRule ^about/?$ /pages/about-us/ [L]
The visitor sees /about. The server loads the other folder quietly.
Example 2: Mask another site
Show a different site's content under your address:
RewriteEngine On
RewriteRule ^(.*)$ https://example.com/$1 [P,L]
The P flag means proxy. It fetches the content for the visitor. This needs the proxy module to be on, which many shared plans do not allow. Ask Hostvento support if it works on your plan.
Example 3: Clean address for a script
RewriteEngine On
RewriteRule ^product/([0-9]+)/?$ product.php?id=$1 [L]
The visitor sees /product/25, while the server runs product.php?id=25.
- Click Save Changes.
- Test the address in your browser.
- If you get an error, restore the backup copy.
Quick recap
- Masking keeps your address while the content comes from elsewhere.
- Use RewriteRule in .htaccess.
- Back up the file before you edit.
- Test and restore if something breaks.