To jest tylko wersja do druku, aby zobaczyć pełną wersję tematu, kliknij TUTAJ
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

Wersje 1.9 i starsze - [MOD] Mapa strony

Widmo - 27-12-2004, 20:19

Mistrz napisał/a:
Mozna to zobaczyc umnie http://www.fajneforum.tk


ciekawe forum

scioper - 28-12-2004, 00:35

Pasja napisał/a:


scioper, ja sie zaczynam zastanawiac czy google wogole indexuje phpbb,.


raczkuje ze tak sie wupowiem
ale to juz cos
jak narazie zideksowalo mi ze 15 stron

arno - 28-12-2004, 00:43

http://216.239.59.104/sea...l=pl&lr=lang_pl
co to jest :? :shock:
a Przema piłknie :
http://64.233.183.104/sea...arno.nmax&hl=en

Pasja - 28-12-2004, 23:43

nie wiem Przemo mowi ze httaces to kiepski pomysl na pomoc dla google, ale mi jednak sie wydaje ze mogloby to zalatwic sprawe w koncy w postnuke tak sprawa jest rozwiazana i strony sa swietnie indexowane

Kod:

# 11: Modulo PNphpBB2
RewriteRule ^PNphpBB2\.html$ index.php?name=PNphpBB2&file=index [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1 [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3 [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5 [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5&$6=$7 [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5&$6=$7&$8=$9 [L,NC,NS]

# RewriteRule ^PNphpBB2\+file-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+).html$ index.php?name=PNphpBB2&file=$1&$2=$3 [L]
# RewriteRule ^PNphpBB2\+file-([a-zA-Z0-9_+]+).html$ index.php?name=PNphpBB2&file=$1 [L]
# RewriteRule ^PNphpBB2\+file-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+).html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5 [L]

# 12: Modulo phpBB2
RewriteRule ^phpBB2\+file-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+).html$ index.php?name=phpBB2&file=$1&$2=$3 [L]
RewriteRule ^phpBB2\+file-([a-zA-Z0-9_+]+).html$ index.php?name=phpBB2&file=$1 [L]
RewriteRule ^phpBB2\+file-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+).html$ index.php?name=phpBB2&file=$1&$2=$3&$4=$5 [L]


ta czesc odpowiada za zmiane linkow w pnphpbb ( modyfikacja phpbb pod postnuka ) i z tym hackiem bardzo ladnie jest indexowane PNphpbb!

Kod:

Options FollowSymLinks
RewriteEngine On

# -- This is to deactivate urls like this: index.php?POSTNUKESID=9ee22afbb07b4d9987a1f81b89748767
# -- Because Searchengines don't follow links like this
# -- PLEASE REMOVE IF YOU GET AN ERROR 500 !
php_flag session.use_trans_sid off

# Se elimina typetool -- Gracias a andreag
RewriteRule ^modules/typetool/.*$ - [PT]

# This option is for use in Virtual Hosts or .htaccess files to inherit rewrite rules in the main section,
# so if you have your own server you don't have to copy the rules into every Virtual Host you run.
# Will cause an error if placed in the main httpd.conf section, as there's nothing to inherit.
# Thanks to supa
# RewriteOptions 'inherit'

# -- Para el phpinfo -- prueba de que funciona el mod_rewrite
RewriteRule ^phpinfo.html$ /phpinfo.php [L]

# 1: index.php and user.php
RewriteRule ^changelang-([^-]+)\.html$ index.php?newlang=$1 [L,NC,NS]
RewriteRule ^changetheme-([^-]+)\.html$ index.php?theme=$1 [L,NC,NS]
RewriteRule ^admin\.html$ admin.php [L,NC,NS]
RewriteRule ^index\.html$ index.php [L,NC,NS]
RewriteRule ^user\.html$ user.php [L,NC,NS]

# 2: User related URLs
RewriteRule ^UserInfo-([^-]+)\.html$ user.php?op=userinfo&uname=$1 [L,NC,NS]
RewriteRule ^UserReg\.html$ user.php?op=register&module=NS-NewUser [L,NC,NS]
RewriteRule ^UserReg-CheckAge\.html$ user.php?op=check_age&module=NS-NewUser [L,NC,NS]
RewriteRule ^User-Login\.html$ user.php?op=loginscreen&module=NS-User [L,NC,NS]
RewriteRule ^User-LostPassword\.html$ user.php?op=lostpassscreen&module=NS-LostPassword [L,NC,NS]
RewriteRule ^User-Logout\.html$ user.php?module=NS-User&op=logout [L,NC,NS]

# 3: Private Messages
RewriteRule ^Messages-outbox\.html$ modules.php?op=modload&name=Messages&file=outbox [L,NC,NS]
RewriteRule ^Messages-inbox\.html$ modules.php?op=modload&name=Messages&file=index [L,NC,NS]

# 4: Article Full Story with default parameters
RewriteRule ^displayarticle([0-9]+).html$ modules.php?op=modload&name=News&file=article&sid=$1&mode=thread&order=0&thold=0 [L]

# 5: Article Full Story with default parameters but mode specified
RewriteRule ^displayarticle([0-9]+)-([^\.])+.html$ modules.php?op=modload&name=News&file=article&sid=$1&mode=$2&order=0&thold=0 [L]

# 6: Send an email about an article
RewriteRule ^sendarticle([0-9]+).html$ modules.php?op=modload&name=Recommend_Us&file=index&req=FriendSend&sid=$1 [L]

# 7: Print an article
RewriteRule ^printarticle([0-9]+).html$ print.php?sid=$1 [L]

# 8: Content Express
RewriteRule ^Content-([^-]+)-([0-9]+)-([0-9]+)-menu.html$ index.php?module=ContentExpress&func=display&bid=$2&btitle=$1&mid=$3&ceid=-1 [L]
RewriteRule ^Content-([^-]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ index.php?module=ContentExpress&func=display&bid=$2&btitle=$1&mid=$3&ceid=$4 [L]

# 9: List articles in a topic
RewriteRule ^Topic([0-9]+).html$ modules.php?op=modload&name=News&file=index&catid=&topic=$1 [L]
RewriteRule ^Topic([0-9]+)allstories.html$ modules.php?op=modload&name=News&file=index&catid=&topic=$1&allstories=1 [L]

# 10: Modulo Post Calendar
RewriteRule ^PostCalendar\-([a-zA-Z0-9_]+)-event-([0-9]+).html$ index.php?module=PostCalendar&func=view&Date=$1&tplview=&viewtype=details&eid=$2&print=[L]
RewriteRule ^PostCalendar\-([0-9]+)-([a-zA-Z0-9_]+)-([a-zA-Z0-9_]+).html$ index.php?module=PostCalendar&func=view&tplview=$3&viewtype=$2&Date=$1&pc_username=&pc_category=&pc_topic=&print=[L]
RewriteRule ^PostCalendar\-([0-9]+)-([a-zA-Z0-9_]+).html$ index.php?module=PostCalendar&func=view&tplview=&viewtype=$2&Date=$1&pc_username=&pc_category=&pc_topic=&print=[L]
RewriteRule ^PostCalendar\-([0-9]+).html$ index.php?module=PostCalendar&func=view&tplview=default&viewtype=month&Date=$1 [L]

# 11: Modulo PNphpBB2
RewriteRule ^PNphpBB2\.html$ index.php?name=PNphpBB2&file=index [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1 [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3 [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5 [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5&$6=$7 [L,NC,NS]
RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5&$6=$7&$8=$9 [L,NC,NS]

# RewriteRule ^PNphpBB2\+file-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+).html$ index.php?name=PNphpBB2&file=$1&$2=$3 [L]
# RewriteRule ^PNphpBB2\+file-([a-zA-Z0-9_+]+).html$ index.php?name=PNphpBB2&file=$1 [L]
# RewriteRule ^PNphpBB2\+file-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+).html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5 [L]

# 12: Modulo phpBB2
RewriteRule ^phpBB2\+file-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+).html$ index.php?name=phpBB2&file=$1&$2=$3 [L]
RewriteRule ^phpBB2\+file-([a-zA-Z0-9_+]+).html$ index.php?name=phpBB2&file=$1 [L]
RewriteRule ^phpBB2\+file-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+)-([a-zA-Z0-9_+]+).html$ index.php?name=phpBB2&file=$1&$2=$3&$4=$5 [L]

# 13: Modulo XForum
RewriteRule ^XForum-profile.html$ modules.php?op=modload&name=XForum&file=member&action=editpro [L]
RewriteRule ^XForum-users.html$ modules.php?op=modload&name=XForum&file=members.list [L]
RewriteRule ^XForum-search.html$ modules.php?op=modload&name=XForum&file=search [L]
RewriteRule ^XForum-msg.html$ modules.php?op=modload&name=XForum&file=messotd [L]
RewriteRule ^XForum-cp.html$ modules.php?op=modload&name=XForum&file=cp [L]
RewriteRule ^XForum-faq.html$ modules.php?op=modload&name=XForum&file=misc&action=faq [L]
RewriteRule ^XForum-stats.html$ modules.php?op=modload&name=XForum&file=stats [L]
RewriteRule ^XForum-tid([0-9]+).html$ modules.php?op=modload&name=XForum&file=viewthread&tid=$1 [L]
RewriteRule ^XForum-fid([0-9]+).html$ modules.php?op=modload&name=XForum&file=forumdisplay&fid=$1 [L]
RewriteRule ^XForum-gid([0-9]+).html$ modules.php?op=modload&name=XForum&file=index&gid=$1 [L]
RewriteRule ^XForum-tid([0-9]+)-pid([0-9]+).html$ modules.php?op=modload&name=XForum&file=viewthread&tid=$1#pid$2 [L]

# 14: PageEd
RewriteRule ^page-([1-9][0-9]*).html$ index.php?name=PagEd&page_id=$1 [L]
RewriteRule ^page-([1-9][0-9]*).html$ modules.php?op=modload&name=PagEd&file=index&page_id=$1 [L]
RewriteRule ^printpage-([1-9][0-9]*).html$ modules.php?op=modload&name=PagEd&file=index&printerfriendly=1&page_id=$1 [L]
RewriteRule ^pagetopic-([1-9][0-9]*).html$ modules.php?op=modload&name=PagEd&file=index&topictoview=$1 [L]

# 15: My_eGallery
# RewriteRule ^MeG-([^-]+)\.html$ index.php?module=My_eGallery&do=$1 [L,NC,NS]
# RewriteRule ^MeG-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=My_eGallery&do=$1&$2=$3 [L,NC,NS]
# RewriteRule ^MeG-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=My_eGallery&do=$1&$2=$3&$4=$5 [L,NC,NS]
# RewriteRule ^MeG-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=My_eGallery&do=$1&$2=$3&$4=$5&$6=$7 [L,NC,NS]

# 16: NS-User_Points
RewriteRule ^User_Points\.html$ modules.php?op=modload&name=NS-User_Points&file=index [L,NC,NS]

# 17: NS-Link_To_Us
RewriteRule ^Link_To_Us\.html$ modules.php?op=modload&name=NS-Link_To_Us&file=index [L,NC,NS]

# 18: Polls
RewriteRule ^Poll-([0-9]{1,3})([A-Za-z]*)?\.html$ modules.php?op=modload&name=NS-Polls&file=index&req=$2&pollID=$1 [L,NC,NS]
RewriteRule ^Polls\.html$ modules.php?op=modload&name=NS-Polls&file=index [L,NC,NS]

# 19: ppnews
RewriteRule ^ppnews-index\.html$ index.php?module=ppnews&choix=index [L,NC,NS]
RewriteRule ^ppnews-([^-]+)\.html$ index.php?module=ppnews&choix=$1 [L,NC,NS]

# 20: Search functions (by user and by topic)
RewriteRule ^Search-author-([^-]+)\.html$ modules.php?op=modload&name=Search&file=index&action=search&overview=1&active_stories=1&stories_author=$1 [L,NC,NS]
RewriteRule ^Search-topics-([^-]+)\.html$ modules.php?op=modload&name=Search&file=index&action=search&overview=1&active_stories=1&stories_topics[0]=$1 [L,NC,NS]
RewriteRule ^Search-author-([^-]+)-no\.html$ modules.php?op=modload&name=Search&file=index&action=search&active_stories=1&stories_author=$1 [L,NC,NS]
RewriteRule ^Search-topics-([^-]+)-no\.html$ modules.php?op=modload&name=Search&file=index&action=search&active_stories=1&stories_topics[0]=$1 [L,NC,NS]

# 21: daily_archive
RewriteRule ^daily_archive-([^-]+)\.html$ index.php?module=daily_archive&func=$1 [L,NC,NS]
RewriteRule ^daily_archive-([^-]+)-([^-]+)\.html$ index.php?module=daily_archive&func=display&req=get&year=$1&month=$2 [L,NC,NS]
RewriteRule ^daily_archive-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=daily_archive&func=display&req=get&year=$1&month=$2&day=$3 [L,NC,NS]
RewriteRule ^daily_archive-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=daily_archive&func=display&req=get&year=$1&month=$2&day=$3&page=$4 [L,NC,NS]

# 22: General rules for modules with index.php?name=...
RewriteRule ^name-([^-]+)\.html$ index.php?name=$1&file=index [L]
RewriteRule ^name-([^-]+)-([^-]+)\.html$ index.php?name=$1&file=$2 [L]
RewriteRule ^name-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=$1&file=$2&$3=$4 [L]
RewriteRule ^name-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=$1&file=$2&$3=$4&$5=$6 [L]
RewriteRule ^name-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=$1&file=$2&$3=$4&$5=$6&$7=$8 [L]
RewriteRule ^name-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=$1&file=$2&$3=$4&$5=$6&$7=$8&$9=$10 [L]

# 23: General rules for modules with index.php?module=...
RewriteRule ^mod-([a-zA-Z0-9_+]+)\.html$ index.php?module=$1 [L]
RewriteRule ^mod-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2 [L]
RewriteRule ^mod-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4 [L]
RewriteRule ^mod-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6 [L]
RewriteRule ^mod-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6&$7=$8 [L]
RewriteRule ^mod-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6&$7=$8&$9=$10 [L]

# 24: General rules for modules with modules.php?op=modload&name=...&file=...
RewriteRule ^([^-]+)\+([^-]+)\.html$ modules.php?op=modload&name=$1&file=index&req=$2 [L]
RewriteRule ^([^-]+)\.html$ modules.php?op=modload&name=$1&file=index [L]
RewriteRule ^([^-]+)-([^-]+)\.html$ modules.php?op=modload&name=$1&file=$2 [L]
RewriteRule ^([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ modules.php?op=modload&name=$1&file=$2&$3=$4 [L]
RewriteRule ^([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+).html$ modules.php?op=modload&name=$1&file=$2&$3=$4&$5=$6 [L]
RewriteRule ^([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ modules.php?op=modload&name=$1&file=$2&$3=$4&$5=$6&$7=$8 [L]
RewriteRule ^([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ modules.php?op=modload&name=$1&file=$2&$3=$4&$5=$6&$7=$8&$9=$10 [L]

to caly .htacess ja sie zabiore za to po Nowym roku ale najpierw musze poszukac info o budowie tego pliku ;)

EDIT

Ja juz nie kumam google teraz tak patrze i na forum weszly 3 wysukiwarki o 2 w zyciu nie slyszalem a 3 to google i czy ktos potrafi mi wytlumaczyc dlaczego te dwie maloznane ladnie chodza po forum a google albo sie loguje albo oglada profil (jakim cude oglada profil zreszta?) :|

Crack - 29-12-2004, 12:57

Zastosowanie mod_rewrite do forum to żaden problem. Gorzej jeśli ktoś uparę się tak jak ja, że linki muszę był w postaci forums/1.htm, topics/1243.htm. To dobpiero jest sajgon ^^" No, ale nawet udało mi się to jakoś rozwiąza?. Jeśli google się na to złapi?, to udostępnie.
Pasja - 29-12-2004, 16:45

Crack, jakby co to chetnie pomoge w testowaniu ;)
Mistrz - 29-12-2004, 17:06

A ja mam taki problem ze jak mam link html to nie trzyma mi sesji odrazu mnie wylogowywuje co prawda robot google sie nie loguje na forum pod jakims nickiem wiec dla niego jest ok. Ale nadal nie wiem jak zamienic mode=viewprofil&u=2 Gdyz mi to nie wychodzi. Ja tez chetnie pomoge w testowaniu :wink:
pneumapl - 30-12-2004, 06:19

Mistrz napisał/a:
Ale nadal nie wiem jak zamienic mode=viewprofil&u=2


jest taki generator dla laików (sam z niego korzystam) http://www.webmaster-tool...generator.shtml

i tam wygenerujesz sobie wszystko co trzeba

Pasja napisał/a:
Przemo mowi ze httaces to kiepski pomysl na pomoc dla google


może dla google tak, ale za to onet indeksuje wtedy jak trzeba, http://tinyurl.com/7xzlj co prawda google trochę lepiej :) http://tinyurl.com/3skdy ale to zasluga ilosci linków

Mistrz - 30-12-2004, 11:10

pneumapl napisał/a:
jest taki generator dla laików (sam z niego korzystam) http://www.webmaster-tool...generator.shtml

Juz sobie ztym poradzilem i chyba juz mam prawie cale forum w htmlu :wink . No coz tylko dla niezalogowanych ale robotowi powinno starczyc :)

Pasja - 30-12-2004, 11:32

Mistrz, jakbys mogl to zamiesc kod htaces w poscie, zalaczniku zeby kazdy mogl skorzystac poki Crack nie skonczy testow :)
Mistrz - 30-12-2004, 11:40

W pliku Page header.php
po ob_start();
Dodajemy
Kod:
function replace_for_mod_rewrite(&$s) {
// get the correct base_url: protocoll,url,path to make sure to rewrite only internal links
if (empty($HTTP_SERVER_VARS['HTTP_HOST'])) {
   $server = getenv('HTTP_HOST');
} else {
   $server = $HTTP_SERVER_VARS['HTTP_HOST'];
}
// IIS sets HTTPS=off
if (isset($HTTP_SERVER_VARS['HTTPS']) && $HTTP_SERVER_VARS['HTTPS'] != 'off') {
   $proto = 'https://';
} else {
   $proto = 'http://';
}
// Get the name of this URI
// Start of with REQUEST_URI
if (isset($HTTP_SERVER_VARS['REQUEST_URI'])) {
   $path = $HTTP_SERVER_VARS['REQUEST_URI'];
} else {
   $path = getenv('REQUEST_URI');
}
if ((empty($path)) || (substr($path, -1, 1) == '/')) {
   // REQUEST_URI was empty or pointed to a path
   // Try looking at PATH_INFO
   $path = getenv('PATH_INFO');
   if (empty($path)) {
      // No luck there either
      // Try SCRIPT_NAME
      if (isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) {
         $path = $HTTP_SERVER_VARS['SCRIPT_NAME'];
      } else {
         $path = getenv('SCRIPT_NAME');
      }
   }
}

$path = preg_replace('/[#\?].*/', '', $path);
$path = dirname($path);

if (preg_match('!^[/\\\]*$!', $path)) {
   $path = '';
}

$base_url = "$proto$server$path/";
$prefix = '|"(?:'.$base_url.')?';
// now that we know about the correct $prefix we can start the rewriting

$urlin =
array(
$prefix . '(?<!/)index.php"|',
$prefix . '(?<!/)portal.php"|',
$prefix . '(?<!/)album.php"|',
$prefix . '(?<!/)memberlist.php"|',
$prefix . '(?<!/)search.php"|',
$prefix . '(?<!/)spyder_manage.php"|',
$prefix . '(?<!/)search.php\?f=([a-z]*)"|',
$prefix . '(?<!/)staff.php"|',
$prefix . '(?<!/)groupcp.php"|',

$prefix . '(?<!/)viewonline.php"|',
$prefix . '(?<!/)search.php\?search_author=([*.?]*)"|',
$prefix . '(?<!/)groupcp.php\?g=[(0-9)*]"|',
$prefix . '(?<!/)privmsg.php\?mode=post&(?:amp;)u=[(0-9)*]"|',
$prefix . '(?<!/)profile.php\?mode=email&(?:amp;)u=[(0-9)*]"|',
$prefix . '(?<!/)index.php\?mark=forums"|',
$prefix . '(?<!/)shoutbox_view.php"|',
$prefix . '(?<!/)shoutbox_send.php\?mode=hide"|',
$prefix . '(?<!/)album_cat.php\?cat_id=([0-9]*)|',
$prefix . '(?<!/)album_pic.php\?pic_id=([0-9]*)|',

$prefix . '(?<!/)viewforum.php\?f=([0-9]*)&(?:amp;)topicdays=([0-9]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)view=previous"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)view=next"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)postdays=([0-9]*)&(?:amp;)postorder=([a-zA-Z]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)start=([0-9]*)&(?:amp;)postdays=([0-9]*)&(?:amp;)postorder=([a-zA-Z]*)&(?:amp;)highlight=([a-zA-Z0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)"|',
$prefix . '(?<!/)profile.php\?mode=viewprofile&(?:amp;)u=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?p=([0-9]*)\#([0-9]*)"|',

);
$urlout = array(
'"forums.html"',
'"portal.html"',
'"album.html"',
'"memberlist.html"',
'"search.html"',
'"spyder_manage.html"',
'"search\\1.html"',
'"staff.html"',
'"group.html"',

'"viewonline.html"',
'"searchauthor_\\1".html"',
'"grupa"\\1.html"',
'"privpost_\\1.html"',
'"profil_mail_\\1.html"',
'"indexmark.html"',
'"shoutview.html"',
'"shoutsend_hide.html"',
'"albumcat_\\1.html"',
'"albumpic_\\1.html"',

'"viewforum\\1-\\2-\\3.html"',
'"forum\\1.html"',
'"ptopic\\1.html"',
'"ntopic\\1.html"',
'"ftopic\\1-\\2-\\3-\\4.html"',
'"ftopic\\1.html"',
'"ftopic\\1-\\2.html"',
'"ftopic\\1.html"',
'"mview\\1.html"',
'"qtopic\\1-\\1.html"',
);

$s = preg_replace($urlin, $urlout, $s);
return $s;
}
W pliku page_tail.php dodajemy po $db->sql_close();
$contents = ob_get_contents();
ob_end_clean();
echo replace_for_mod_rewrite($contents);
[code]
teraz htaccess[code]RewriteEngine On

RewriteCond %{REQUEST_FILENAME} /forums.html
RewriteRule (.*) /index.php [L]

RewriteCond %{REQUEST_FILENAME} /portal.html
RewriteRule (.*) /portal.php [L]

RewriteCond %{REQUEST_FILENAME} /memberlist.html
RewriteRule (.*) /memberlist.php [L]

RewriteCond %{REQUEST_FILENAME} /spyder_manage.html
RewriteRule (.*) /spyder_manage.php [L]

RewriteCond %{REQUEST_FILENAME} /staff.html
RewriteRule (.*) /staff.php [L]

RewriteCond %{REQUEST_FILENAME} /album.html
RewriteRule (.*) /album.php [L]

RewriteCond %{REQUEST_FILENAME} /search.html
RewriteRule (.*) /search.php [L]

RewriteCond %{REQUEST_FILENAME} /search([a-z]*).html
RewriteRule (.*) /search.php?mode=%1 [L]

RewriteCond %{REQUEST_FILENAME} /viewforum([0-9]*)-([0-9]*)-([0-9]*).html
RewriteRule (.*) /viewforum.php?f=%1&topicdays=%2&start=%3 [L]

RewriteCond %{REQUEST_FILENAME} /forum([0-9]*).html
RewriteRule (.*) /viewforum.php?f=%1 [L]

RewriteCond %{REQUEST_FILENAME} /ptopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&view=previous [L]

RewriteCond %{REQUEST_FILENAME} /ntopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&view=next [L]

RewriteCond %{REQUEST_FILENAME} /mview([0-9]*).html
RewriteRule (.*) /profile.php?mode=viewprofile&u=%1 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&postdays=%2&postorder=%3&start=%4 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*)-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&start=%2 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&start=%2&postdays=%3&postorder=%4&highlight=%5 [L]

RewriteCond %{REQUEST_FILENAME} /qtopic([0-9]*)-([0-9]*).html
RewriteRule (.*) /viewtopic.php?p=%1#%2 [L]

RewriteCond %{REQUEST_FILENAME} /group.html
RewriteRule (.*) /groupcp.php [L]

RewriteCond %{REQUEST_FILENAME} /viewonline.html
RewriteRule (.*) /viewonline.php [L]

RewriteCond %{REQUEST_FILENAME} /searchauthor_([*.?]*).html
RewriteRule (.*) /search.php?search_author=%1 [L]

RewriteCond %{REQUEST_FILENAME} /grupa.html
RewriteRule (.*) /groupcp.php?g=%1 [L]

RewriteCond %{REQUEST_FILENAME} /privpost_([0-9]*).html
RewriteRule (.*) /privmsg.php?mode=post&u=%1 [L]

RewriteCond %{REQUEST_FILENAME} /profil_mail_([0-9]*).html
RewriteRule (.*) /profile.php?mode=email&u=%1 [L]

RewriteCond %{REQUEST_FILENAME} /indexmark.html
RewriteRule (.*) /index.php?mark=forums [L]

RewriteCond %{REQUEST_FILENAME} /shoutview.html
RewriteRule (.*) /shoutbox_view.php [L]

RewriteCond %{REQUEST_FILENAME} /shoutsend_hide.html
RewriteRule (.*) /shoutbox_send.php?mode=hide[L]

RewriteCond %{REQUEST_FILENAME} /albumcat_([0-9]*).html
RewriteRule (.*) /album_cat.php?cat_id=%1 [L]

RewriteCond %{REQUEST_FILENAME} /albumpic_([0-9]*).html
RewriteRule (.*) /album_pic.php?pic_id=%1 [L]

[/code]

Pasja - 30-12-2004, 11:49

tak jak kombinuje z tym generatorem to wychodzi mi narazie

Kod:

Options +FollowSymLinks
RewriteEngine on
RewriteRule forum(.*)\.htm$ /viewtopic.php?t=$1
RewriteRule forum(.*)\.htm$ /viewforum.php?f=$1
RewriteRule forum(.*)-(.*)\.htm$ /profile.php?mode=$1&u=$2
RewriteRule forum(.*)-(.*)-(.*)\.htm$ /viewforum.php?f=$1&topicdays=$2&start=$3
RewriteRule forum(.*)-(.*)\.htm$ /viewtopic.php?t=$1&start=$2

a do tego jeszcze przyjdzie grzebac w plikach i pozmieniac strony takie jak regulamin.php na regulamin.html ale to juz tylko chwila. Dobra pokombinuje pozniej bo dopiero wstalem :wink:

Mistrz - 30-12-2004, 12:01

A jak dziala ten generator bo wypelniam wszystkie pola i nic nowego mi sei nei pojawia
Pasja - 30-12-2004, 12:08

Po wpisaniu i wybraniu jednego z typow (masz dwa do wyboru) pojawia sie okienko z wygenerowana komenda dla httaces

[ Dodano: 30-12-2004, 22:39 ]
Mistrz, nie dziala mi Twoj sposob....

to mi tez nie chodzi...
Kod:

Options +FollowSymLinks
RewriteEngine on
RewriteRule forum(.*)\.htm$ /viewtopic.php?t=$1
RewriteRule forum(.*)\.htm$ /viewforum.php?f=$1
RewriteRule forum(.*)-(.*)\.htm$ /profile.php?mode=$1&u=$2
RewriteRule forum(.*)-(.*)-(.*)\.htm$ /viewforum.php?f=$1&topicdays=$2&start=$3
RewriteRule forum(.*)-(.*)\.htm$ /viewtopic.php?t=$1&start=$2

jakby cos bylo zle to bym nic nie mowil nie znam sie na tym ale dlaczego to kurde wogole nie dziala, tzn nic nie robi :|

Crack - 31-12-2004, 18:57

Na razie uzbierałem już co? takiego:
Kod:
RewriteEngine on

RewriteRule ^avgal.htm$ ./avgal_index.php [L,QSA]
RewriteRule ^avgal/gallery_([0-9al]*),([0-9]+)\.htm$ ./avgal_usergal?u=$1&start=$2 [L,QSA]
RewriteRule ^avgal/gallery_([0-9al]*)\.htm$ ./avgal_usergal?u=$1 [L,QSA]

RewriteRule ^category_([0-9]*)\.htm$ ./index.php?c=$1 [L,QSA]
RewriteRule ^index\.htm$ ./index.php [L,QSA]
RewriteRule ^forums/([0-9]+)-([0-9]+),([0-9]+)\.htm$ ./viewforum.php?f=$1&topicdays=$2&start=$3 [L,QSA]
RewriteRule ^forums/([0-9]+),([0-9]+)\.htm$ ./viewforum.php?f=$1&start=$2 [L,QSA]
RewriteRule ^forums/([0-9]+)\.htm$ ./viewforum.php?f=$1 [L,QSA]

RewriteRule ^prev_topic_([0-9]+)$ ./viewtopic.php?t=$1&view=previous [L,QSA]
RewriteRule ^next_topic_([0-9]+)$ ./viewtopic.php?t=$1&view=next [L,QSA]
RewriteRule ^topics/([0-9]+)-([0-9]+)-([a-zA-Z]+),([0-9]+).htm$ ./viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,QSA]
RewriteRule ^topics/([0-9]+)-([0-9]+)-([a-zA-Z]+)-([a-zA-Z0-9]+),([0-9]+).htm$ ./viewtopic.php?t=$1&start=$5&postdays=$2&postorder=$3&highlight=$4 [L,QSA]
RewriteRule ^topics/([0-9]+),([0-9]+).htm$ ./viewtopic.php?t=$1&start=$2 [L,QSA]
RewriteRule ^topic_post_([0-9]+).*$ ./viewtopic.php?p=$1 [L,QSA]
RewriteRule ^topics/([0-9]+).htm$ ./viewtopic.php?t=$1 [L,QSA]

RewriteRule ^search\.htm/([0-9a-z]+),([0-9]+)$ ./search.php?search_id=$1&start=$2 [L,QSA]
RewriteRule ^search\.htm/([0-9a-z]+)$ ./search.php?search_id=$1 [L,QSA]
RewriteRule ^search\.htm/authors/(.+),([0-9]+)$ ./search.php?search_author=$1&start=$2 [L,QSA]

RewriteRule ^members/([a-z]+)_([a-z]*)-([A-Za-z]+),([0-9]+).htm$ ./memberlist.phpźletter=$2&mode=$1&order=$3&start=$4 [L,QSA]
RewriteRule ^members\.htm$ ./memberlist.php [L,QSA]

RewriteRule ^profiles/([0-9]+)\.htm$ ./profile.php?mode=viewprofile&u=$1 [L,QSA]

RewriteRule ^groups/([0-9]+)\.htm$ ./groupcp.php?g=$1 [L,QSA]

RewriteCond   %{REQUEST_FILENAME} !-f
RewriteCond   %{REQUEST_FILENAME} (.*)\.htm
RewriteRule   ^(.+)\.htm(\?.*)? $1.php$2 [E=WasHTML:yes]
RewriteCond   %{ENV:WasHTML} ^yes$
RewriteCond   %{REQUEST_FILENAME} !-f
RewriteRule   ^(.+)\.php(\?.*)? $1.htm$2


Co do testowania moda, opublikuj? gdy google dadz? się złapać (na razie bezbłądnie działa na MSNBota).

[ Dodano: 31-12-2004, 19:04 ]
Tak przy okazji, ma ktoś listą polskich botów? Musz? wiedzień jak się identyfikuj? (zmienna $_SERVER['HTTP_USER_AGENT']), bo póki co mój mod nie działa na polskie wyszukiwarki (ma dwa tryby pracy: tylko dla wyszukiwarek albo dla wszystkich użytkowników).



Powered by phpBB modified by Przemo © 2003 phpBB Group