GTT PR1


Inscrit le: 28 Juil 2007 Messages: 190 Localisation: www.marylou.0rg.fr
|
Posté le: Sam Sep 06, 2008 12:17 pm Sujet du message: Re: URL rewriting sur page annexe |
|
|
Bon... J'ai bien fait tout comme tu as dis, ça rejoins ce que j'avais fait au départ mais ça ne fonctionne pas... Sachant que la page du portail ne s'appelle plus bb3portal.php mais portal.php, voici mes modifs :
Dans phpbb_seo/phpbb_seo_class.php, j'ai trouvé :
| Code: | // Rewrite functions array : array('file_name' => 'function_name');
// Allow to add options without slowing down the URL rewrite process
$this->rewrite_functions = array( 'viewtopic' => $this->seo_opt['virtual_folder'] ? 'viewtopic_uadv' : 'viewtopic_adv',
'viewforum' => 'viewforum_adv',
'index' => 'index',
'memberlist' => $this->seo_opt['profile_inj'] ? 'memberlist_adv' : 'memberlist_smpl',
'search' => $this->seo_opt['rewrite_usermsg'] ? ($this->seo_opt['profile_inj'] ? 'search_adv' : 'search_smpl') : '',
// Now the pagination /pagexx.html vs -xx.html
'topic_pagination' => $this->seo_ext['topic'] === '/' ? 'rewrite_pagination_page' : 'rewrite_pagination',
'forum_pagination' => $this->seo_ext['forum'] === '/' ? 'rewrite_pagination_page' : 'rewrite_pagination',
'group_pagination' => $this->seo_ext['group'] === '/' ? 'rewrite_pagination_page' : 'rewrite_pagination',
'user_pagination' => $this->seo_ext['user'] === '/' ? 'rewrite_pagination_page' : 'rewrite_pagination',
'atopic_pagination' => $this->seo_ext['atopic'] === '/' ? 'rewrite_pagination_page' : 'rewrite_pagination',
'utopic_pagination' => $this->seo_ext['utopic'] === '/' ? 'rewrite_pagination_page' : 'rewrite_pagination',
'npost_pagination' => $this->seo_ext['npost'] === '/' ? 'rewrite_pagination_page' : 'rewrite_pagination',
); |
Et ajouté après :
| Code: | // portal rewrite
$this->seo_opt['rewrite_functions']['portal'] = 'portal';
// portal rewrite |
Ensuite, j'ai trouvé :
| Code: | /**
* URL rewritting for index.php
* @access private
*/ |
Et j'ai ajouté avant :
| Code: | /**
* URL rewritting for portal.php
* @access private
*/
function portal() {
$this->path = $this->seo_path['phpbb_urlR'];
$this->url = 'accueil.html';
return;
} |
Puis dans mon .htaccess, j'ai trouvé :
| Code: | # FORUM INDEX
RewriteRule ^forum/index\.html$ /forum/index.php [QSA,L,NC] |
Et j'ai ajouté avant :
| Code: | | RewriteRule ^forum/accueil\.html$ /forum/portal.php [QSA,L,NC] |
Normalement, ça devrait fonctionner, non ?
Edit : lorsque je vais sur la page accueil.html, je trouve bien mon portail, aucun problème, mais si je navigue sur le forum et que je reviens sur le portail, il reste en portal.php
PS : voici mon .htacess :
| Code: | # 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
# Options FollowSymLinks
# RewriteEngine on
RewriteCond %{HTTP_HOST} ^auto-passion-forum\.com$ [NC]
RewriteRule ^(.*) http://www.auto-passion-forum.com/$1 [QSA,L,R=301]
RewriteRule (.+)\.cgi$ /cgi-bin/cgiwrap/autopassionforum/$1.cgi
RewriteRule (.+)\.php5$ /cgi-bin/cgiwrap/autopassionforum/cgi/php5.cgi/$1.php5
Options -Indexes
ErrorDocument 404 /404.html
#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
RewriteRule ^forum/accueil\.html$ /forum/portal.php [QSA,L,NC]
# FORUM INDEX
RewriteRule ^forum/index\.html$ /forum/index.php [QSA,L,NC]
# FORUM
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ /forum/viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^forum/annonces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^forum/([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES THROUGH USERNAME
RewriteRule ^forum/membre/([^/]+)/?$ /forum/memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^forum/membre/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /forum/search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^forum/[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /forum/memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^forum/sujets-actifs(-([0-9]+))?\.html$ /forum/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^forum/sans-reponses(-([0-9]+))?\.html$ /forum/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^forum/nouveaux-messages(-([0-9]+))?\.html$ /forum/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^forum/equipe\.html$ /forum/memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES
#####################################################
# GYM Sitemaps & RSS
# Global channels
RewriteRule ^forum/rss(/(news)+)?(/(digest)+)?(/(short|long)+)?/?$ /forum/gymrss.php?channels&$2&$4&$6 [L,NC]
# END GYM Sitemaps & RSS
#####################################################
# FORUM WITHOUT ID & DELIM
# THESE THREE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^forum/([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /forum/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
#####################################################
# GYM Sitemaps & RSS
# Main feeds & channels
RewriteRule ^forum/rss(/(news)+)?(/(digest)+)?(/(short|long)+)?(/([a-z0-9_-]+))?/([a-z0-9_]+)\.xml(\.gz)?$ /forum/gymrss.php?$9=$8&$2&$4&$6&gzip=$10 [L,NC]
# Forum feeds
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /forum/gymrss.php?$8=$1&$3&$5&$7&gzip=$9 [L,NC]
# Module feeds without ids
RewriteRule ^forum/([a-z0-9_-]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /forum/gymrss.php?nametoid=$1&$3&$5&$7&modulename=$8&gzip=$9 [L,NC]
# Google SitemapIndex
RewriteRule ^forum/sitemapindex\.xml(\.gz)?$ /forum/sitemap.php?gzip=$1 [L,NC]
# Forum sitemaps
RewriteRule ^forum/[a-z0-9_-]+-f([0-9]+)\.xml(\.gz)?$ /forum/sitemap.php?forum=$1&gzip=$2 [L,NC]
# Module sitemaps
RewriteRule ^forum/([a-z0-9_]+)-([a-z0-9_-]+)\.xml(\.gz)?$ /forum/sitemap.php?$1=$2&gzip=$3 [L,NC]
# END GYM Sitemaps & RSS
##################################################### |
|
_________________ Auto Passion Forum | Marylou |
|