[DEV] [3.1] [3.2] SEO URLs
Forumsregeln
ABD = ABANDONED = Verlassen/Aufgegeben
ABD = ABANDONED = Verlassen/Aufgegeben
- In diesem Forum werden nicht länger gepflegte Extensions respektive ihre Themen aufbewahrt. Nur lesender Zugriff!
- Wir raten generell davon ab solche Erweiterungen zu installieren, da sowohl Support als auch Weiterentwicklung ungewiss sind.
- Soll an den Extensions weitergearbeitet werden, bitten wir den Autor eine Nachricht per Kontaktformular zu senden.
Re: [DEV] SEO URLs
Gibt es vllt eine andere SEO Ext die das kann? ich habe seit 10 Jahren ein Forum mit dieser Url Struktur, und möchte sehr ungerne darauf verzichten.
Dabei würde ich so gerne auf 3.1. updaten
Dabei würde ich so gerne auf 3.1. updaten
- tas2580
- Ehemaliges Teammitglied
- Beiträge: 3029
- Registriert: 01.07.2004 05:42
- Wohnort: /home/tas2580
- Kontaktdaten:
Re: [DEV] SEO URLs
So weit ich weiß gibt es zur Zeit für phpBB 3.1 keine andere Extension die URLs umschreibt. Du kannst aber diese Extension so abändern das sie URLs nach deinem Muster ausgibt. Das Problem ist dann nur das du die Änderung bei jedem Update wieder neu machen musst. Außerdem solltest du beachten das die Extension noch an einigen Stellen Probleme macht. Wenn du es trotzdem versuchen willst:
Öffne die event/listener.php im Ordner der Extension und suche dort:
Ersetze es mit:
Suche:
Ersetze es mit:
Dann brauchst du in der .htaccess die Rewrite Regeln:
Gruß Tobi
Edit
Rewrite Regeln korrigiert
Öffne die event/listener.php im Ordner der Extension und suche dort:
Code: Alles auswählen
private function generate_topic_link($forum_id, $forum_name, $topic_id, $topic_title, $start = 0, $full = false)
{
if ($full)
{
return generate_board_url() . '/' . $this->title_to_url($forum_name) . '-f' . $forum_id . '/' . $this->title_to_url($topic_title) . '-t' . $topic_id . ($start ? '-s' . $start : '') . '.html';
}
return $this->path_helper->update_web_root_path($this->phpbb_root_path . $this->title_to_url($forum_name) . '-f' . $forum_id . '/' . $this->title_to_url($topic_title) . '-t' . $topic_id . ($start ? '-s' . $start : '') . '.html');
}
Code: Alles auswählen
private function generate_topic_link($forum_id, $forum_name, $topic_id, $topic_title, $start = 0, $full = false)
{
if ($full)
{
return generate_board_url() . '/topic' . $topic_id . ($start ? '-s' . $start : '') . '.html';
}
return $this->path_helper->update_web_root_path($this->phpbb_root_path . 'topic' . $topic_id . ($start ? '-s' . $start : '') . '.html');
}
Suche:
Code: Alles auswählen
private function generate_forum_link($forum_id, $forum_name, $start = 0, $full = false)
{
if ($full)
{
return generate_board_url() . '/' . $this->title_to_url($forum_name) . '-f' . $forum_id . '/' . ($start ? 'index-s' . $start . '.html' : '');
}
return $this->path_helper->update_web_root_path($this->phpbb_root_path . $this->title_to_url($forum_name) . '-f' . $forum_id . '/' . ($start ? 'index-s' . $start . '.html' : ''));
}
Code: Alles auswählen
private function generate_forum_link($forum_id, $forum_name, $start = 0, $full = false)
{
if ($full)
{
return generate_board_url() . '/forum' . $forum_id . ($start ? '-s' . $start . '.html' : '');
}
return $this->path_helper->update_web_root_path($this->phpbb_root_path . 'forum' . $forum_id . ($start ? '-s' . $start . '.html' : ''));
}
Code: Alles auswählen
RewriteRule ^topic([0-9]*)-s([0-9]*).html viewtopic.php?t=$1&start=$2&%{QUERY_STRING} [L]
RewriteRule ^topic([0-9]*).html viewtopic.php?t=$1&%{QUERY_STRING} [L]
RewriteRule ^forum([0-9]*)-s([0-9]*).html viewforum.php?f=$1&start=$2&%{QUERY_STRING} [L]
RewriteRule ^forum([0-9]*).html viewforum.php?f=$1&%{QUERY_STRING} [L]
Edit
Rewrite Regeln korrigiert
Heute ist ein guter Tag um dein Forum zu testen.
Ehemaliger Benutzername: [BTK] Tobi
Ehemaliger Benutzername: [BTK] Tobi
Re: [DEV] SEO URLs
Ich hab die Änderungen in einem nicht wichtigen Forum ausprobiert und es klappt schonmal, danke. Auch das Löschen und Sperren von Themen funktioniert jetzt. Jedoch werden die Links unterhalb der Postings nicht umgeschrieben (Gehe zum Forum XXX, Zurück zu Hauptforum). Auch die Links in der Navileiste oberhalb der Beiträge zu den jeweiligen Forenrubriken werden auch nicht umgeschrieben. In meinen anderen phpBb Foren die mir wichtiger sind, würde ich daher diese Extension (noch) nicht installieren wollen.
Aber das ist schonmal ein Schritt in die richtige Richtung
Werden die oben erwähnten Links noch ungeschrieben werden können? Würde mich jedenfalls sehr freuen.
Aber das ist schonmal ein Schritt in die richtige Richtung

Werden die oben erwähnten Links noch ungeschrieben werden können? Würde mich jedenfalls sehr freuen.
- tas2580
- Ehemaliges Teammitglied
- Beiträge: 3029
- Registriert: 01.07.2004 05:42
- Wohnort: /home/tas2580
- Kontaktdaten:
Re: [DEV] SEO URLs
Zur Zeit gibt es dafür keine Events, um die Links umzuschreiben müsste man also Dateien in phpBB selber verändern. Ob es die Events in zukünftigen Versionen einmal geben wird kann ich nicht sagen.
Gruß Tobi
Gruß Tobi
Heute ist ein guter Tag um dein Forum zu testen.
Ehemaliger Benutzername: [BTK] Tobi
Ehemaliger Benutzername: [BTK] Tobi
Re: [DEV] SEO URLs
Hello! I just found your ext. for phpBB and I am having a problem with it. My site for the forum is, http://agentc0re.com/Forum. The actual folder where it is stored is forum. There are some rewrite rules in place to change that. Anyways, check out how my site displays after enabling your plugin. No clue why. I've added the following rewrite rules to my .httaccess in my forum directory.
One thing that concerns me is that there is no forum.html, or maybe it's trying to rewrite that so that when index.php is access it looks like forum.html?? If that's the case, i'd not like that to happen. Would instead i changed that to 'Forum' which is my rewrite rule that points to the forums index.php?
I hope you either understand english or that the translation is good.
Thank you for any help you can provide!!
-Jon
UPDATE 1
OKAY im super dumb. I enabled a different plugin without looking and also added the rewrite rules. Well as you'd expect, the site didn't function without your plug. Here's the thing though, your plugin is not showing up as an ext. that i can enable. here is a image of my directory structure to show you. https://gyazo.com/0d8cdc0819701cd4a28446da81c0d42e What i've noticed that is different from your plugins and others that i have is it's missing a ext.php or some .php file in the root that i believe tells phpBB that you are indeed an ext. I hope this makes sense.
Thanks again!
-Jon
Update 2
AHHHHHHHHHHH HAH! I found out the problem. Due to the lack of my reading skills, i noticed i needed to rename the folder from the downloaded zip file from seourls-master to seourls. Now it shows up as an ext. I AM DUMB. But i hope this post helps someone else.
If i have further issues, i'll let you know.
-Jon
Code: Alles auswählen
## These rewrite rules are for the SEO urls ##
<IfModule mod_rewrite.c >
RewriteEngine On
RewriteBase /forum
RewriteRule ^(.*)-f([0-9]*)/(.*)-t([0-9]*)-s([0-9]*).html viewtopic.php?f=$2&t=$4&start=$5&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/(.*)-t([0-9]*).html viewtopic.php?f=$2&t=$4&%{QUERY_STRING} [L]
RewriteRule global/(.*)-t([0-9]*).html ./viewtopic.php?f=1&t=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/index-s([0-9]*).html viewforum.php?f=$2&start=$3&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/ viewforum.php?f=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*) viewforum.php?f=$2&%{QUERY_STRING} [L]
RewriteRule ^forum.html index.php?%{QUERY_STRING} [L]
</IfModule>
I hope you either understand english or that the translation is good.

Thank you for any help you can provide!!
-Jon
UPDATE 1
OKAY im super dumb. I enabled a different plugin without looking and also added the rewrite rules. Well as you'd expect, the site didn't function without your plug. Here's the thing though, your plugin is not showing up as an ext. that i can enable. here is a image of my directory structure to show you. https://gyazo.com/0d8cdc0819701cd4a28446da81c0d42e What i've noticed that is different from your plugins and others that i have is it's missing a ext.php or some .php file in the root that i believe tells phpBB that you are indeed an ext. I hope this makes sense.
Thanks again!
-Jon
Update 2
AHHHHHHHHHHH HAH! I found out the problem. Due to the lack of my reading skills, i noticed i needed to rename the folder from the downloaded zip file from seourls-master to seourls. Now it shows up as an ext. I AM DUMB. But i hope this post helps someone else.

If i have further issues, i'll let you know.
-Jon
Re: [DEV] SEO URLs
Hi, kann man eigentlich auch irgendwo einstellen, wie lang die URL maximal sein soll? Ein paar Foren-URLs sind bei mir leider etwas "abgehackt", daher würde ich gerne die maximale Länge etwas erweitern...
Re: [DEV] SEO URLs .htaccess
Sorry for the english!
I have the following .htaccess file and it has broken the seositemap.xml
I needed to change .htaccess due to SEO URLS, the URLS work but the sitemap.xml I had and the seositemap.xml do not work now.
They must be getting rewritten to something that is not valid I get 404 errors now.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^nl6621.net [NC]
RewriteRule ^(.*)$ http://www.nl6621.net/$1 [L,R=301,NC]
RewriteBase /
RewriteRule ^(.*)-f([0-9]*)/(.*)-t([0-9]*)-s([0-9]*).html viewtopic.php?f=$2&t=$4&start=$5&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/(.*)-t([0-9]*).html viewtopic.php?f=$2&t=$4&%{QUERY_STRING} [L]
RewriteRule global/(.*)-t([0-9]*).html ./viewtopic.php?f=1&t=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/index-s([0-9]*).html viewforum.php?f=$2&start=$3&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/ viewforum.php?f=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*) viewforum.php?f=$2&%{QUERY_STRING} [L]
RewriteRule ^forum.html index.php?%{QUERY_STRING} [L]

I needed to change .htaccess due to SEO URLS, the URLS work but the sitemap.xml I had and the seositemap.xml do not work now.
They must be getting rewritten to something that is not valid I get 404 errors now.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^nl6621.net [NC]
RewriteRule ^(.*)$ http://www.nl6621.net/$1 [L,R=301,NC]
RewriteBase /
RewriteRule ^(.*)-f([0-9]*)/(.*)-t([0-9]*)-s([0-9]*).html viewtopic.php?f=$2&t=$4&start=$5&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/(.*)-t([0-9]*).html viewtopic.php?f=$2&t=$4&%{QUERY_STRING} [L]
RewriteRule global/(.*)-t([0-9]*).html ./viewtopic.php?f=1&t=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/index-s([0-9]*).html viewforum.php?f=$2&start=$3&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/ viewforum.php?f=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*) viewforum.php?f=$2&%{QUERY_STRING} [L]
RewriteRule ^forum.html index.php?%{QUERY_STRING} [L]
Re: [DEV] SEO URLs
Frage :
Gibt es irgend eine Möglichkeit die SEOurls auch in den feeds auszugeben ?
Wäre sehr hilfreich da ich die Themen auf meinem Form als RSS feed auf anderen Seiten ausgebe
Gibt es irgend eine Möglichkeit die SEOurls auch in den feeds auszugeben ?
Wäre sehr hilfreich da ich die Themen auf meinem Form als RSS feed auf anderen Seiten ausgebe
Re: [DEV] SEO URLs
Kann Jemand eine funktionierende Nginx Config posten? Ich habe nun verschiedenes ausprobiert aber nichts funktioniert. Ich nutze phpBB 3.1.8. Danke für eure Hilfe.
- tas2580
- Ehemaliges Teammitglied
- Beiträge: 3029
- Registriert: 01.07.2004 05:42
- Wohnort: /home/tas2580
- Kontaktdaten:
Re: [DEV] SEO URLs
Nach den feeds schaue ich naechste Woche mal. Rewrite fuer nginx gibt es hier: https://github.com/tas2580/seourls/blob ... ewrite.txt
Heute ist ein guter Tag um dein Forum zu testen.
Ehemaliger Benutzername: [BTK] Tobi
Ehemaliger Benutzername: [BTK] Tobi