Seo Rewrite Problem (different index)

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

Seo Rewrite Problem (different index)

Postby sypher » Thu Jul 26, 2007 9:58 am

Hello everyone,
i have installed the current release over the RC3, and its working great except for some (hopefully small) issues.

I have a different directory index, its not "index.php" but it is "portal.php".
I've set that with directoryindex in .htaccess file, the problem is that the "index.php" its still used (for displaying the forums), but, as far as i can tell, when i call www.mysite.com/index.php it gets redirected to www.mysite.com,
subsequently calling "portal.php" instead of index.php

Any fix for this?

Thanks in advance

Edit:
I can quickfix it by setting "index.php" as "index" in the seo mod file, but this results in the forum being displayed without seo links
(ex: http://localhost/viewforum.php?f=16) instead of the seo link url.
Maybe its caused by the portal? It happens on the first page too, on the "news" postings, but i checked inside the portal blocsk and it uses "append_sid()" to generate the urls.

Edit2:
Disabling the portal and going to index.php produces seoed links, so the problem is within the inclusion of the left blocsk of the portal ....
Any clues on what should i look for that might possibly disable the seoing of the links ? The portal just includes his blocks and all seems harmless. :( :( :(

Thansk in advance again
sypher
 
Posts: 13
Joined: Mon Jul 23, 2007 1:46 pm

Advertisement

Postby SeO » Thu Jul 26, 2007 10:38 am

From the install file :

IMPORTANT :
________________________________________
Once you will have installed the mod, you will have to empty the phpBB/cache/ folder before the mod will fully work,
just delete all files BUT the .htaccess.
________________________________________

By Default, this mod will get rid of index.php for phpBB's index.
You can change this in phpbb_seo/phpbb_seo_class.php if you prefer.
Look for :

Code: Select all
         'index' => ''


And replace with :

Code: Select all
         'index' => 'index.html'


or whatever you prefer.
This is mostly useful if you're running a portal in the folder where phpBB is installed.
You'll have to un-comment (get rid of the '#' at the beginning of the line) the FORUM INDEX rewriterule in the following .htaccess.
Remember you have to change index\.html in case you changed the above index.html to something else.

The same with the-team.html and announces/, you can change them as long as you will update the rewriterules accordingly.
To do so, look for :

Code: Select all
         'leaders' => 'the-team.html'


And / or :
Code: Select all
         'global_announce' => 'announces/',


In phpbb_seo_class.php.
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm

Postby sypher » Thu Jul 26, 2007 12:53 pm

Maybe i was not clear enough (or i misunderstood something) but i tried that already.

in my seo_class IF i use

'index' => 'portal.php',

without directoryindex directive in .htaccess and enable
RewriteRule ^index\.html$ /portal.php [QSA,L]

i get that when i call index.php i get redirected to the www.site.com (no way to reach index.php) and this is not what i want.

Am i mistaking something ?

To make this clear, the directory index should not be index.php but portal.php, but still, index.php should be "call-able" as it is used to show the forums.
I could quickfix that by commenting the rewriterule indexblahblah, using directoryindex portal.php and setting as index in the seo class index.php.
That way it works, but still im having the problem that the links are getting out not "seo-ed", and thats due to a portal problem i guess ... (since if i disable the portal and avoid calling its blocsk the urls coming out are with seo).
any clues on what might disable seo from within the blocks? (just tell me around what should i look for or avoid, and i'll check the code on it)

I hope i have explained well :(
Sorry for my english, but its not my main language.

Sypher

-----------------
edit: solved, its a portal related problem.
this line is causing the issue:
// 'U_VIEWFORUM' => ($row['forum_type'] != FORUM_LINK || ($row['forum_flags'] & FORUM_FLAG_LINK_TRACK)) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : $row['forum_link'],

for the time being i commented it, since i aint using that particoular block.
thanks everyone
sypher
 
Posts: 13
Joined: Mon Jul 23, 2007 1:46 pm

Postby dcz » Fri Jul 27, 2007 6:13 pm

Rewriting the portal link is another thing, the idea is you first need to make sure you do not use the root link for the forum index (example.com/) if you want to use it for the portal instead.

Then, if you keep the root link for the portal with the directoryindex instruction, then, you should as well make sure you only use example.com and not example.com/portal.php to avoid duplicates.

You can though decide you don't want to use the root link, but something like example.com/home.html instead, you'll need to URL rewrite a bit.

Doing so with phpBB portal properly using append_sid is pretty easy, just this in in phpbb_seo_class.php :
Code: Select all
   /**
   * URL rewritting for portal.php
   * @access private
   */
   function portal() {
      $this->url = $this->seo_path['phpbb_url'] . 'home.html';
      return;
   }


;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 3 guests