MyBB Community Forums

Full Version: Friendly URL "Auto Detection"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It doesn't seem to me like the Auto Detect setting for friendly URLs is working how it should. If a .htaccess file is present, and it contains the MyBB rules, shouldn't it rewrite the URLs?

In my experiences, I have to Enable the setting, otherwise MyBB doesn't rewrite the URLs automatically. Stock setting is Auto Detect, which will be false since the rules file will be htaccess.txt instead. But if I rename it, MyBB still doesn't catch on.

I think that the current behavior is a little odd or incomplete as it is right now?

Any different experiences? I have experienced this on GV and on my 3 machines running an AMP stack (Mac, Linux, and Windows) and they all are relatively different in setup, IMO.
It doesn't matter if it has the rules, the detection depends on this:

	<IfModule mod_env.c>
		SetEnv SEO_SUPPORT 1
	</IfModule>

And that only works with the env mod enabled.

You're better off setting the mode you want manually anyway, as otherwise, if your host ever changes its server configurations, all your URLs suddenly change as well...
Admittedly, I haven't looked at the code yet. I was just saying that it seems a little odd from a plain user perspective.
Here's the code (from inc/init.php)

if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))

And as frostschutz said, that depends on $_SERVER['SEO_SUPPORT']/mod_env.
Ugh. Must be something with XAMPP.