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  
 
   
Portal.php

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 Forum
::  
Author Message
digital1



Joined: 26 Oct 2007
Posts: 30
Location: India

Portal.phpPosted: Sun May 18, 2008 2:28 am    Post subject: Portal.php

Hello,
I use phpbb3 portal from board3.de. I want the follwing result on the portal page.
portal.php to portal.html
What edits should be done to achieve this,
I use advance mod rewrite,
Thanks Smile
Back to top
digital1



Joined: 26 Oct 2007
Posts: 30
Location: India

Portal.phpPosted: Sun May 18, 2008 5:14 am    Post subject: Re: Portal.php

One more thing, Whenever i logout from portal page it redirects me back to forum index. Is it possible to redirect the person loging out from portal page to portal page only? In all other cases it works fine like if any one is on topic page and log out there then he will be redirected back to the page he was viewing before logging out.
Back to top
digital1



Joined: 26 Oct 2007
Posts: 30
Location: India

Portal.phpPosted: Tue May 20, 2008 5:07 am    Post subject: Re: Portal.php

Log out problem is not only with portal page. When viewing a topic page and user logs out then he is redirected back to forum index page instead of the page he was viewing when logging out.

Here is the htaccess in my root installation

Code:
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

DirectoryIndex portal.php index.php index.html index.htm

# You may need to un-comment the following line
# Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION
RewriteCond %{HTTP_HOST} ^infoinn.pcriot\.com$ [NC]
RewriteRule ^(.*) http://www.infoinn.pcriot.com/$1 [QSA,L,R=301]
#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX
RewriteRule ^forums\.html$ /index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ /viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES ADVANCED
RewriteRule ^[a-z0-9_-]*-u([0-9]+)/$ /memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# USER MESSAGES ADVANCED
RewriteRule ^[a-z0-9_-]*-u([0-9]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^infoinn-team\.html$ /memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
Back to top
digital1



Joined: 26 Oct 2007
Posts: 30
Location: India

Portal.phpPosted: Wed May 21, 2008 7:12 am    Post subject: Re: Portal.php

Any one please, i am stuck at this, help in resolving, give a hint please
Back to top
digital1



Joined: 26 Oct 2007
Posts: 30
Location: India

Portal.phpPosted: Fri May 30, 2008 7:07 pm    Post subject: Re: Portal.php

Anyone, Still seeking for help. Rolling Eyes
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Portal.phpPosted: Mon Jun 02, 2008 8:30 am    Post subject: Re: Portal.php

The login redirect is not related to mod rewrite, but rather to the portal script.
I'm sure the issue was covered in the portal support site.

About rewriting portal.php to posrtal.html, it's not really worth it IMO.

The simplest to rewrite this simple link would be to hard code the rewritten portal home link most likely added to phpBB's code upon install (incluedes/functions.php => page_header()). You could hard code portal.html instead of portal.php from there.

You would just need to add :

Code:
# PORTAL INDEX
RewriteRule ^portal\.html$ /portal.php [QSA,L,NC]


Before :
Code:
# FORUM INDEX
RewriteRule ^forums\.html$ /index.php [QSA,L,NC]


if your .htaccess to handle the rewriten link.

_________________
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
digital1



Joined: 26 Oct 2007
Posts: 30
Location: India

Portal.phpPosted: Tue Jun 03, 2008 9:22 am    Post subject: Re: Portal.php

Thanks for giving reply.

First problem of redirect has been sorted out.

Second One , i am confused what code to be edited to hardcode rewritten portal home link... Confused
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3089

Portal.phpPosted: Tue Jun 03, 2008 9:40 am    Post subject: Re: Portal.php

When you installed the portal, you added some code to display a link in the header and footer to the portal's home, in includes/functions.php correct ?

It' the link to change.

_________________
Back to top
digital1



Joined: 26 Oct 2007
Posts: 30
Location: India

Portal.phpPosted: Tue Jun 03, 2008 5:45 pm    Post subject: Re: Portal.php

Thanks, a lot.

I found and done all the required edits.

All things seems to be working good except one thing..

When i type www.....com/portal.php url is not rewritten to portal.html

It remains as portal.php


But when i type www....com/index.php url is rewritten correctly to forums.html
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Portal.phpPosted: Wed Jun 04, 2008 8:32 am    Post subject: Re: Portal.php

This is the zero duplicate's magic, it's not mod_rewrite here Wink

You should find your answer in this thread : Redirecting portal.php

++

_________________
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
digital1



Joined: 26 Oct 2007
Posts: 30
Location: India

Portal.phpPosted: Wed Jun 04, 2008 3:01 pm    Post subject: Re: Portal.php

Quote:
You should find your answer in this thread : Redirecting portal.php


Yes the link was helpful a little bit, but it is for PHPBB2 version{IMO} and also i have zero dupe installed so

$uri = $_SERVER['REQUEST_URI'];

is confusing.
Also i am not getting around the code before/after the code is to be added.

Can you repost the code according to latest revison of PHPBB3?????
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3089

Portal.phpPosted: Wed Jun 04, 2008 3:21 pm    Post subject: Re: Portal.php

Well the solution is general, works with all script actually.

If you have the zero dupe installed and if your portal is sharing phpBB sessions, then you could use :
Code:

if (strpos($phpbb_seo->seo_path['uri'], 'portal.php') && !strpos($phpbb_seo->seo_path['uri'], "?") {
   $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url'] . 'portal.html');
}


Before :

Code:
$user->session_begin();


should do the trick Wink

_________________
Back to top
digital1



Joined: 26 Oct 2007
Posts: 30
Location: India

Portal.phpPosted: Wed Jun 04, 2008 4:18 pm    Post subject: Re: Portal.php

The code provided above return syntax error but on rechecking that code i found a little typo and fixed it as follows.

Code:
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (strpos($phpbb_seo->seo_path['uri'], 'portal.php') && !strpos($phpbb_seo->seo_path['uri'], "?")) {
    $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url'] . 'portal.html');
  }
// www.phpBB-SEO.com SEO TOOLKIT END


Thanks for the whole support now problems are solved.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 Forum
Page 1 of 1

Navigation Similar Topics

Jump to: