SEO 1.0 - New Links
#1
What i should change to not be that: http://allemuza.pl/przywitaj-sie-43.html but that as section http://allemuza.pl/przywitaj-sie/ and links to topics shows that :http://allemuza.pl/przywitaj-sie/2655-10-11-08-hello.html
Reply
#2
Is this through a plugin, or through MyBB itself?

To change MyBB, you'll need to alter the .htaccess file, and also the bottom of .inc/init.php - but I don't really know whether it will work as I haven't tested changing it.
Reply
#3
This user has been denied support. This user has been denied support.
He's asked for that in several places already... including my and Spicefuse's SEO plugin thread.

The main problem about introducing such a directory structure into MyBB URLs is that MyBB uses a lot of relative links, which would stop working when introducing any kind of virtual directory structure with mod_rename/htaccess in a plugin.

I also told him that but it seems he's desparate. Wink
Reply
#4
(2008-12-22, 08:59 AM)Tom.M Wrote: Is this through a plugin, or through MyBB itself?

To change MyBB, you'll need to alter the .htaccess file, and also the bottom of .inc/init.php - but I don't really know whether it will work as I haven't tested changing it.

init.php
/* URL Definitions */
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))
{
	define('FORUM_URL', "forum-{fid}.html");
	define('FORUM_URL_PAGED', "forum-{fid}-page-{page}.html");
	define('THREAD_URL', "thread-{tid}.html");
	define('THREAD_URL_PAGED', "thread-{tid}-page-{page}.html");
	define('THREAD_URL_ACTION', 'thread-{tid}-{action}.html');
	define('THREAD_URL_POST', 'thread-{tid}-post-{pid}.html');
	define('POST_URL', "post-{pid}.html");
	define('PROFILE_URL', "user-{uid}.html");
	define('ANNOUNCEMENT_URL', "announcement-{aid}.html");
	define('CALENDAR_URL', "calendar-{calendar}.html");
	define('CALENDAR_URL_YEAR', 'calendar-{calendar}-year-{year}.html');
	define('CALENDAR_URL_MONTH', 'calendar-{calendar}-year-{year}-month-{month}.html');
	define('CALENDAR_URL_DAY', 'calendar-{calendar}-year-{year}-month-{month}-day-{day}.html');
	define('CALENDAR_URL_WEEK', 'calendar-{calendar}-week-{week}.html');
	define('EVENT_URL', "event-{eid}.html");
	define('INDEX_URL', "index.php");
}
else
{
	define('FORUM_URL', "forumdisplay.php?fid={fid}");
	define('FORUM_URL_PAGED', "forumdisplay.php?fid={fid}&page={page}");
	define('THREAD_URL', "showthread.php?tid={tid}");
	define('THREAD_URL_PAGED', "showthread.php?tid={tid}&page={page}");
	define('THREAD_URL_ACTION', 'showthread.php?tid={tid}&action={action}');
	define('THREAD_URL_POST', 'showthread.php?tid={tid}&pid={pid}');
	define('POST_URL', "showthread.php?pid={pid}");
	define('PROFILE_URL', "member.php?action=profile&uid={uid}");
	define('ANNOUNCEMENT_URL', "announcements.php?aid={aid}");
	define('CALENDAR_URL', "calendar.php?calendar={calendar}");
	define('CALENDAR_URL_YEAR', "calendar.php?action=yearview&calendar={calendar}&year={year}");
	define('CALENDAR_URL_MONTH', "calendar.php?calendar={calendar}&year={year}&month={month}");
	define('CALENDAR_URL_DAY', 'calendar.php?action=dayview&calendar={calendar}&year={year}&month={month}&day={day}');
	define('CALENDAR_URL_WEEK', 'calendar.php?action=weekview&calendar={calendar}&week={week}');
	define('EVENT_URL', "calendar.php?action=event&eid={eid}");
	define('INDEX_URL', "index.php");
}

.htaccess
RewriteRule ^index.html$ index.php [L,NE]
RewriteRule ^(.*)-t-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L]
RewriteRule ^(.*)-t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)-u-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L]
RewriteRule ^members/(.*)-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L]
RewriteRule ^(.*)/(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)-f-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)-f-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7 [L]
RewriteRule ^(.*)-a-([0-9]+).html$ announcements.php?aid=$2 [L]

what to change ?
Reply
#5
I think it's a little beyond our scope in Support, you're best of asking this question in the Plugins & Code Modifications Section.

I'll move it for you so you don't need to make a new topic...
Reply
#6
(2008-12-22, 09:53 AM)frostschutz Wrote: The main problem about introducing such a directory structure into MyBB URLs is that MyBB uses a lot of relative links, which would stop working when introducing any kind of virtual directory structure with mod_rename/htaccess in a plugin.
A <base> tag would be a workaround Toungue Example
Reply
#7
This user has been denied support. This user has been denied support.
Thanks. I didn't know about <base>. You learn something new every day. Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)