View Full Version : redirecting question


Lakini's Juice
01-29-2003, 01:22 AM
I'm a bit confused. I want to redirect from http://mydomain.com/index.html (I already learnt by mistake that if I forget the index.html I end up with http://mydomain.com/blogblogblogblogblog... and a 400 error page) to http://mydomain.com/blog. I know that I can do it through my cpanel. I also know that it uses .htaccess to do that. I was told that by my friend who owns the company that host my domain. I don't know what .htaccess is really though I've heard alot about it.

My problem is when I set it through my cpanel to redirect from http://mydomain.com/index.html to http://mydomain.com/blog it allso redirects my subdomains (or rather hostees subdomains) to http://mydomain.com/blog unless you tack index.html (or whatever thier main page is) onto the end of http://whatever.mydomain.com when you put the url in your browser.

Does anyone know why it does that? And how can I fix it?

I know I can redirect through http-equiv but I don't like it because even when you put 0 it's still not instant.

But is there any other way to do it? Like javascript or something?

thanks

Alcy
01-29-2003, 06:53 PM
There's a lot of redirect javascripts - just do a search (http://www.google.ca/search?hl=en&ie=UTF-8&oe=UTF-8&q=javascript+redirect+code&btnG=Google+Search&meta=) on google for them :)

Or here's one:
<script language="javascript">
<!--
location.replace("http://www.google.ca");
-->
</script>