Przyjazne URL'e w SMF

Zaczęty przez cakper, 13 Czerwiec 2007, 07:14

0 użytkowników i 2 Gości przegląda ten wątek.

mcfuck

u mnie też coś sie zje... , i taki sam błąd jak koledze wyskakuje tylko ze w 41 linii kodu instal.php

General_Depet

Cytat: Kukis w 13 Grudzień 2007, 17:02
[edit]
Błąd bazy danych
Powtórzone wyst?pienie 'seo4smf_accented_enable' dla klucza 1
Plik: /home/accounts_k/kukis/public_html/forum/Packages/temp/install.php
Linia: 26

A wyczyściłeś stare rekordy z bazy od tego moda skoro instalujesz go ponownie ? Wejdź w phpMyAdmin > opcja Search > wpisz SEO i zobacz co Ci wyskoczy w tabeli "Settings".
Portal Gier Strategicznych | The Generals' Guild | Biblioteka Gier
http://generalsguild.com/

mcfuck

teraz wyczyściłem, zainstalowało się łanie ale nie działa :/, linki są takie same jak wcześniej :/

General_Depet

Cytat: mcfuck w 25 Grudzień 2007, 14:49
teraz wyczyściłem, zainstalowało się łanie ale nie działa :/, linki są takie same jak wcześniej :/

A zrobiłeś wszystko tak jak tutaj opisałem > http://www.smf.pl/index.php/topic,1725.msg12544.html#msg12544 ?

Wyedytowałeś poprawnie .htaccess ? Wklej kod i podaj namiar na forum.
Portal Gier Strategicznych | The Generals' Guild | Biblioteka Gier
http://generalsguild.com/

mcfuck

Postąpiłem tak jak w poradniku, link do forum www.ebookgigs.com, posty maja rozszerzenie .html no ale tematy jeszcze niestety nie

Szalony Szeryf

Witam
Moje forum zawsze działało wg zmiany z pierwszego postu, czyli podmienieniem na:
'is_apache' => true,
'is_cgi' => false,

Po upgradzie do wersji 1.1.7 przestało to jednak działać. W zasadzie to stare proste linki działają, ale na forum tematy wyświetlają się znów z "?".
Propozycje ?
www.forum.spartan7.pl - Profesjonalna pomoc w zakresie kulturystyki, trójboju siłowego i fitness

smoku119

#21
co dopisac w pilku .htaccess zeby zamiast http://rmvbfan.pl/forum/filmy_pl/a�wiadectwo_2008-t1586.0.html
wyswietlało sie
http://rmvbfan.pl/forum/filmy_pl/swiadectwo_2008-t1586.0.html
wyeliminowac polskie znaki
moj htaccess:
CytatRewriteEngine on

#Some apache servers need Rewritebase.
#delete # from start of Rewrite base to enable it.
#If your forum is something like http://www.forum-example.com/forum then modify your
#RewriteBase in this way: RewriteBase /forum

RewriteBase /forum

#Archive/Sitemaps
RewriteRule ^sitemaps-([a-zA-Z0-9-]*)\.html index.php?dummy=1&action=seo4smfsitemaps&sa=$1 [L]

#uncomment if you use beautifying url actions
#RewriteCond %{REQUEST_METHOD} =GET
#RewriteCond %{QUERY_STRING} ^action=(.*)$
#RewriteRule  ^(.*)$ seo4smf-redirect.php?a=%1 [R=301,L]

RewriteCond %{QUERY_STRING} ^topic=([0-9]*)$
RewriteRule  ^(.*)$ seo4smf-redirect.php?t=%1 [R=301,L]

RewriteCond %{QUERY_STRING} ^topic=([0-9]*).([0-9]*)
RewriteRule  ^(.*)$ seo4smf-redirect.php?t=%1 [R=301,L]

RewriteCond %{QUERY_STRING} ^board=([0-9]*).([0-9]*)
RewriteRule  ^(.*)$ seo4smf-redirect.php?b=%1 [R=301,L]

RewriteCond %{QUERY_STRING} ^action=profile;u=([0-9]*);(.*)$
RewriteRule  ^(.*)$ seo4smf-redirect.php?u=%1;param=%2 [R=301,L]

RewriteCond %{QUERY_STRING} ^action=profile;u=([0-9]*)
RewriteRule  ^(.*)$ seo4smf-redirect.php?u=%1 [R=301,L]

AddHandler application/x-httpd-php .php
#Tiny Portal Old Url's
RewriteCond %{QUERY_STRING} ^page=([0-9]*)
RewriteRule  ^(.*)$ seo4smf-redirect.php?p=%1 [R=301,L]

#Rewrite Old urls
RewriteRule  ^index.php/board,(.*).html seo4smf-redirect.php?b=$1 [R=301,L]
RewriteRule  ^index.php/board,(.*).html;(.*) seo4smf-redirect.php?b=$1&o=$2 [R=301,L]

RewriteRule  ^index.php/topic,(.*).html seo4smf-redirect.php?t=$1 [R=301,L]
RewriteRule  ^index.php/topic,(.*).html;(.*) seo4smf-redirect.php?t=$1&o=$2 [R=301,L]

#Bad Url's
#RewriteCond %{REQUEST_URI} ^(.*)\.html$
#RewriteCond %{REQUEST_URI} !^(.+)/(.*)-t([0-9]*)\.([0-9]*).html$
#RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html seo4smf-redirect.php?t=$2 [R=301,L]

RewriteRule  ^(.*)/-t(.*).html seo4smf-redirect.php?t=$2 [R=301,L]
RewriteRule  ^-b(.*)/$ seo4smf-redirect.php?b=$1 [R=301,L]
RewriteRule  ^-b(.*)/(.*)$ seo4smf-redirect.php?b=$1 [R=301,L]
RewriteRule  ^(.*)/-b(.*)/$ seo4smf-redirect.php?b=$2 [R=301,L]

#New board URL's
RewriteRule ^(.*)-b([0-9]*)\.([0-9]*)/;(.*) index.php?dummy=1&board=$2.$3&$4 [L]
RewriteRule ^(.*)-b([0-9]*)\.([0-9]*)/$ index.php?dummy=2&board=$2.$3 [L]
RewriteRule ^(.*)-b([0-9]*)\.([0-9])$ index.php?dummy=2&board=$2.$3 [L]

#New topic URL's
RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html;((\?:from|msg|new)[0-9]*);(.*)$ index.php?dummy=1&topic=$2.$4&$6 [L]
RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html;((\?:from|msg|new)[0-9]*) index.php?dummy=1&topic=$2.$4 [L]
RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html;(.*)$ index.php?dummy=1&topic=$2.$3&$4 [L]
RewriteRule ^(.*)-t([0-9]*)\.([0-9]*)\.html$ index.php?dummy=1&topic=$2.$3 [L]

#New profiles URL's
RewriteRule ^(.*)-u([0-9]*)\.html;sa,(.*);start,([0-9]*);delete,([0-9]*);sesc,([a-z0-9]*)$ index.php?dummy=1&action=profile;u=$2;sa=$3;start=$4;delete=$5;sesc=$6 [L]
RewriteRule ^(.*)-u([0-9]*)\.html;sa,(.*);start,([0-9]*)$ index.php?dummy=1&action=profile;u=$2;sa=$3;start=$4 [L]
RewriteRule ^(.*)-u([0-9]*)\.html;sa,(.*)$ index.php?dummy=1&action=profile;u=$2;sa=$3 [L]
RewriteRule ^(.*)-u([0-9]*)\.html index.php?dummy=1&action=profile;u=$2 [L]

#New Tinyportal Articles URL's
RewriteRule ^(.*)-p([0-9]*)\.html index.php?dummy=1&page=$2 [L]

#New action Url's - uncomment if you use beautifying url actions
#RewriteRule ^(.*)\.html(.*)$ index.php?dummy=1;action=$1;$2 [L]
#RewriteRule ^(.*)\.html$ index.php?dummy=1;action=$1 [L]

#Sitemaps
RewriteRule sitemap.xml sitemaps.php [L]
RewriteRule urllist.txt urllist.php [L]

richcio

#22
skąd ja wezmę SMF 1.14 ? :|


EDIT: POLECAM MODA http://custom.simplemachines.org/mods/index.php?mod=636 
Pretty URLs
http://rapsite.pl
polski hip hop

malcolm_x

Jakby kto zetknął się z opisem jak Pretty URLs odpalić pod Lighttpd będę wdzięczny za info :)


malcolm_x

Wielkie dzięki, tych rewriteów mi brakowało, dam znać jak to wypróbuję.

Zastanawiam się czy wszystkie te mody które gość wymienił trzeba żeby to działało, czy tylko usprawniają SEO...

Duch

Dwa ostatnie z listy zdecydowanie są zbyteczne, jeżeli chodzi nawet o seo, reszta dotyczy raczej tylko seo ;)

malcolm_x

Wszystko działa jeśli chodzi o lighttpd i prettyurls, można zobaczyć tu: http://www.akwarium.net.pl/forum/

Jedyny problem jaki został to tematy w których są cudzysłowa - wejście do takich kończy się 404 :(

zastosowałem te regułki:

  "^/forum/([-_!~*'()$a-zA-Z0-9]+)(/(\?(.*)))?/?$" => "/forum/index.php?pretty;board=$1.0&$4",
  "^/forum/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)(/(\?(.*)))?/?$" => "/forum/index.php?pretty;board=$1.$2&$5",
  "^/forum/([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)(/(\?(.*)))?/?$" => "/forum/index.php?pretty;board=$1;topic=$2.0&$5",
  "^/forum/([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)(/(\?(.*)))?/?$" => "/forum/index.php?pretty;board=$1;topic=$2.$3&$6",
  "^/forum/?$" => "/forum/index.php",


Jeśli ma ktoś pomysł jak naprawić " będę wdzięczny :)

malcolm_x

Ok, naprawiłem to zmieniając:
Sources/Subs-PrettyUrls.php
#               "\x12"  =>      array ("'", '"'),
                ""      =>      array ("'", '"'),

potem w mysql:
truncate table smf_pretty_topic_urls;

i w administracji pretty urls "Run maintenance tasks"

jawor

Polecam wtyczkę Pretty URL !