OK let's see... As far as I know you can't redirect using just HTML. HTML is only a document language for displaying data, nothing got to do with the workings of a website or anything complicated.
To create a .htaccess file simply create a new notepad document and save it as .htaccess and under all file types. If your computer doesn't allow you to do this, log into your server and upload a file called x.htaccess or something and then just rename it to .htaccess. Problem solved there.
The .htaccess will only work on an apache server (maybe only on a Linux system, i'm not too sure), so if you have one, this would be the best way of doing it. If your talking about using ASP then I would imagine that you have a windows server and not a Linux one.
As for using ASP or any other server scripting language, scripts will only execute the code that is contained within their files when those files are called. So yes, it would have to be an index file (assuming the code works).
Now onto the how to sort it out...
There are a few ways you can redirect your .net to your .com.
I use GoDaddy.com Hosting and they allow you to set domains as a referrer to another domain. Handiest way to do it by far.
I also tried using PHP to redirect the user based on what url was entered.
First I added my .net to my server as an alias domain name. (Both domain names would work exactly the same) Then I added this to the header file of my website: It's PHP
Code:
<?php
$domain_ext = '.net';
$current_addr = $_SERVER['SERVER_NAME'];
$current_domain_ext = substr($current_addr,strlen($current_addr)-4,4);
if($current_domain_ext == $domain_ext)
{
header("location: http://www.mydomain.com");
}
?>
Hope that helps.
Oh and one more thing. You can do a redirect using JavaScript but I wouldn't advise it because if a user's JS is turned off, the redirect wouldn't work. But if you were feeling extremely lazy, you could put in a JavaScript redirect and provide a text link if there JS was turned off.
Code:
<script language="JavaScript">
if(window.location == 'http://www.mydomain.net' || window.location == http://mydomain.net')
{
window.location = 'http://www.mydomain.com';
}
</script>
It would be something like that. JS ain't my specialty so it would require abit of digging on your part.