phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Problem with mixed mod rewrite

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
::  
Author Message
thekiller20



Joined: 21 Jan 2007
Posts: 3

Problem with mixed mod rewritePosted: Sun Jan 21, 2007 2:02 am    Post subject: Problem with mixed mod rewrite

help me please ... i`v done all the things by the boock and mod rewrite still not worcking.
this are my actual configuration files.
the .htacces
Code:
# FORUMS PAGES
########################
# FORUM PROTECTION RULE
RewriteRule ^forum/.+/([^/]+\.html)$ /forum/index.php [R=301,L]
# CATEGORIES
RewriteRule ^forum/.+-vc([0-9]+)\.html$ /forum/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^forum/.+-vf([0-9]+)-([0-9]+)\.html$ /forum/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^forum/.+-vf([0-9]+)\.html$ /forum/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^forum/topic([0-9]+)-([0-9]+)\.html$ /forum/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^forum/topic([0-9]+)\.html$ /forum/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^forum/member([0-9]+)\.html$ /forum/profile.php?mode=viewprofile&u=$1 [QSA,L]
# END forum PAGES
#####################################################

the forum is located in subfolder
here is the sessions.php
Code:
function append_sid($url, $non_html_amp = false)
{
   global $SID;   
   global $phpEx, $seo_cat_name, $seo_forum_name;
   $amp = ($non_html_amp) ? '&' : '&';
   $find = array(   $amp.'start=0',
         $amp.'postdays=0',
         $amp.'topicdays=0',
         $amp.'postorder=asc',
      );
   $url = str_replace ($find, "", $url);
   if ( $seo_cat_name ) {
      $urlin = array( "'(?)index.".$phpEx."\?c=([0-9]+)(".$amp."){0,1}'",
            // mx Sitemaps Module (cat URL injection)
            "'(?)sitemaps([0-9]+)\.html(".$amp."){0,1}'",
         );
      $urlout = array( "".format_url($seo_cat_name)."-vc\\1.html".if_query('\\2')."",
            // mx Sitemaps Module (cat URL injection)
            "".format_url($seo_cat_name)."-sc\\1.html".if_query('\\2')."",
         );
      $url = preg_replace($urlin, $urlout, $url);
   }
   if ( $seo_forum_name ) {
      $urlin = array( "'(?)viewforum.".$phpEx."\?f=([0-9]+)".$amp."start=([0-9]+)(".$amp."){0,1}'",
            "'(?)viewforum.".$phpEx."\?f=([0-9]+)(".$amp."){0,1}'",
            // mx Sitemaps Module (forum URL injection + pagination)
            "'(?)forum-map([0-9]+)\.html".$amp."start=([0-9]+)(".$amp."){0,1}'",
            "'(?)forum-map([0-9]+)\.html(".$amp."){0,1}'",
         );
      $urlout = array( "".format_url($seo_forum_name)."-vf\\1-\\2.html".if_query('\\3')."",
            "".format_url($seo_forum_name)."-vf\\1.html".if_query('\\2')."",
            // mx Sitemaps Module (forum URL injection + pagination)
            "".format_url($seo_forum_name)."-fmp\\1-\\2.html".if_query('\\3')."",
            "".format_url($seo_forum_name)."-fmp\\1.html".if_query('\\2')."",
         );
      $url = preg_replace($urlin, $urlout, $url);
   }
   $urlin = array( "'(?)viewtopic.".$phpEx."\?t=([0-9]+)".$amp."start=([0-9]+)(".$amp."){0,1}'",
         "'(?)viewtopic.".$phpEx."\?t=([0-9]+)(".$amp."){0,1}'",   
               "'(?)viewtopic.".$phpEx."\?p=([0-9]+)(".$amp."){0,1}'",
         "'(?)profile.".$phpEx."\?mode\=viewprofile".$amp."u=([0-9]+)(".$amp."){0,1}'",
         );
   $urlout = array( "topic\\1-\\2.html".if_query('\\3')."",
         "topic\\1.html".if_query('\\2')."",
         "post\\1.html".if_query('\\2')."",   
         "member\\1.html".if_query('\\2')."",
      );
   $url = preg_replace($urlin, $urlout, $url);
   $url = (substr($url, strlen($url) - 1, 1) == '?') ? substr($url, 0, strlen($url) - 1) : $url;

   if ( !empty($SID) && !preg_match('#sid=#', $url) )
   {
      $url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
   }

   return $url;
}


the steps that i made :
i removed the session id ...
next i had installed the mx Sitemaps
then the mixed mod ... i double cheked the installation .. there is no mistake .. but there is a problem my generated links don`t work..
my site url is (i deleted the account )

P.S i`m sorry for my bad eanglish.... it has been a wile since i wrote last time . thanks.


Last edited by thekiller20 on Sun Jan 21, 2007 11:54 am; edited 2 times in total
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15131

Problem with mixed mod rewritePosted: Sun Jan 21, 2007 2:08 am    Post subject: Re: Problem with mixed mod rewrite

And welcome Very Happy

Simple question to start with, you did put :
Code:

RewriteEngine on
RewriteBase /


in your .htaccess, and put it in your domain's root folder (eg one level above forum/) ?

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
thekiller20



Joined: 21 Jan 2007
Posts: 3

Problem with mixed mod rewritePosted: Sun Jan 21, 2007 2:10 am    Post subject: Re: Problem with mixed mod rewrite

yes i did...
Code:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15131

Problem with mixed mod rewritePosted: Sun Jan 21, 2007 2:33 am    Post subject: Re: Problem with mixed mod rewrite

Ok, so the .htaccess is at the domain's root level too.

Are you sure you've got the mod_rewrtie module on your server?

If so try getting rid of :

Code:
Options +FollowSymlinks


As well, you can try getting rid of the "/" at the beginning of forum/ like this :
Code:
RewriteRule ^forum/.+-vc([0-9]+)\.html$ forum/index.php?c=$1 [QSA,L]


If nothing works, chances are great that you do not have the mod_rewrite module on your server.

Because, all this only deals with it now, as the links are all rewritten well.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
thekiller20



Joined: 21 Jan 2007
Posts: 3

Problem with mixed mod rewritePosted: Sun Jan 21, 2007 11:52 am    Post subject: Re: Problem with mixed mod rewrite

yes you are right mod_rewrite is of .... i just asked the admin.
thanks for your suport.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: