MyBB Community Forums

Full Version: Is It Possible To Change The MyBB SEF Url's?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

Is it possible to change the MyBB SEF Url's from this:

/user-75416.html

to this?

/user/75416.html
Use the Google SEO plugin. Smile Makes even prettier URLs by default.
Whilst doable with the Google SEO mod, it isn't recommended: https://github.com/frostschutz/MyBB-Goog...-structure
But the default URLs the Google SEO plugin gives are even more SEO than TS' desired URLs. Smile
Hi everyone,

I'm not talking about the Google SEO Plugin, I am asking about the MyBB SEF Url's.

Is it possible to change the MyBB SEF Url's from this:

/user-75416.html

to this?

/user/75416.html

It's not really about a virtual directory structure, but just changing the "-" to a "/".
(2014-05-17, 01:57 AM)Greg Winston Wrote: [ -> ]It's not really about a virtual directory structure, but just changing the "-" to a "/".

Using / anywhere is what a virtual directory structure is.

MyBB uses relative URLs - and those don't work well if you put things in subdirs.

It's a pointless change really. Going from user-75416.html to user/75416.html does not improve anything about your URLs, and it will cause you no end of trouble.

You can change them easily enough, see inc/init.php, define('FORUM_URL' and so on and so forth. Adapt your rewrite rules accordingly.
(2014-05-17, 11:08 AM)frostschutz Wrote: [ -> ]You can change them easily enough, see inc/init.php, define('FORUM_URL' and so on and so forth. Adapt your rewrite rules accordingly.

I get 404 errors. I tried enabling the Default SEF URL's, I haven't changed the default settings yet, but it just gives me 404 Errors. What do I need to do?
Do you have your htaccess file set up right? That needs to be there for the SEF URLs to work initially, and will need to be changed to reflect any changes you make to the URL templates in inc/init.php
(2014-05-18, 12:00 PM)Cameron:D Wrote: [ -> ]Do you have your htaccess file set up right? That needs to be there for the SEF URLs to work initially, and will need to be changed to reflect any changes you make to the URL templates in inc/init.php

I just have a .htaccess file, but there is nothing in it.

Where can I go to find out how to set it up right, is it in the MyBB documentation? If so, I couldn't find it.

I got the 404 errors just by enabling the default SEF URL's, without changing the init.php file.

So what is the first step in making the default SEF URL's work?
You must rename the htaccess.txt file in the root of your MyBB installation to .htaccess (in this case you could just copy the contents and delete htaccess.txt).

Using a / in your SEF URLs will cause many issues (as frostschutz mentioned), I do not recommend it one bit. If user-51459.html is not good enough for you then User-JordanMussi should be (it's much prettier Wink).
Pages: 1 2