News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How to get "site.com/page" to redirect to /page/index.html

Started by rubix123, December 30, 2010, 09:55:04 AM

Previous topic - Next topic

rubix123

Ok so I created a new "page" directory in my public_html folder and put an index.html file in it. Right now when I go to mysite.com/page/ it still has my forum's theme, but I do not want my theme. I would like links from site.com/page to redirect to site.com/page/index.html and if possible hide the index.html so it only comes up "site.com/page"

kat

If you go to a site and don't stipulate that you want it to go to index.php, the browser goes through a list of files that it looks for.

index.htm, index.html, index.php, etc.

So, you can't redirect from page to page/index.php, because your browser will already look for index.php.

(That's assuming that I've understood what youve said, correctly).

Although, you CAN set up redirects to anywhere, within reason.

I believe you can use .htaccess, to do that, for one.

Google "Redirect" and you'll find loads of examples of how to do it.

Advertisement: