I recently had to move my form for my root into a folder on the root (due to file permissions, windows hoasting, godaddy bla bla bal)
So right now I just have a index page on the root with a hyper-link to the forum.
Is there a way to just set up a auto redirect, so anyone going to mydomain/index.html automatically get sent to mydomain/forum/index.php
Are you actually running SMF 2.1 beta1?
Your posts in the other boards suggest not....
there is a way... but it differs between windows and linux hosting... so, which one are you actually running?
sorry, yes I posted in totally the wrong place........its been a long day!
I'm on 2.0.9
I currently have a index.php with the following code, but not sure if this method has downsides as there seems to be 101 ways to do it, all with pros and cons, mainly SEO.
<?php
header('Location: http://mydomain/forum/', true, 301);
exit();
?>
Quote from: peps1 on January 28, 2015, 02:23:06 PM
sorry, yes I posted in totally the wrong place........its been a long day!
I'm on 2.0.9
I currently have a index.php with the following code, but not sure if this method has downsides as there seems to be 101 ways to do it, all with pros and cons, mainly SEO.
<?php
header('Location: http://mydomain/forum/', true, 301);
exit();
?>
Permanent redirect PHP, that is as good as it gets my friend. If it is working, all is well. You could also use .htaccess --- I'm a bit tipsy though. Just look up ".htaccess redirect"........ http://coolestguidesontheplanet.com/redirecting-a-web-folder-directory-to-another-in-htaccess/
except htaccess mostly only works well on linnux and not well on windows... which is, again, why I asked....
Quote from: Kindred on January 28, 2015, 02:48:41 PM
which is, again, why I asked....
I'm on Windows hosting.
in that case, your php redirect using the header is probably your best option...
Eh?
.htaccess works fine on any Apache server, regardless of operating system. But Windows hosting doesn't always use Apache... hard to know what's actually in use here. If it's Apache, .htaccess will work fine. If it's IIS, you will need to do it in PHP.
Ah. Thanks for that clarification, Arantor... you are indeed correct -- and I was assuming that windows server == IIS... which is potentially incorrect.
This is also somewhat relevant: http://stackoverflow.com/questions/257936/htaccess-or-htpasswd-equivalent-on-iis
In case someone is running an IIS server and wants an .htaccess equivalent rewrite.