Okokok,
Let's give you a solution this time around, shall we?
Let's recap:
- You have domain.com which has a DocumentRoot of /home/domain/public_html
- You have sub.domain.com which has a DocumentRoot of /home/domain/public_html/sub
- You want that when someone goes to
sub.domain.com that it shows domain.com/file.shtml
To achieve this, you need two things:
- Remove your sub-domain and re-add it using the DocumentRoot of /home/domain/public_html (note: no /sub at the end)
- Create a .htaccess in your public_html/ with the following:
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^sub\.domain\.com$
RewriteRule ^(.*)$ /home/domain/public_html/file.shtml [L]
Voila.
The catch is that both sub.domain.com and domain.com need to share the same document root, or "folder" so that the .htaccess redirects to the right place.
I confirmed on my end. The only hitch I had to overcome was that pesky DocumentRoot being the same.
Let me know if this helps or not and if not, I'll give you a functional example using your domain with step-by-step.
Warmest regards,