Index
Forums
Annuaire
Référencement
Télécharger
  phpBB SEO : Référencement Google, MSN, Yahoo, Annuaires, Forums  
phpBB SEO
Boards
Directory  
SEO  
Downloads
 
  Rechercher Search
    S'enregistrer
Pseudo :  Passe :  Auto  
Register  
 
   
Conflit htaccess joomla/phpbb

 
Poster un nouveau sujet   Répondre au sujet    phpBB SEO » Forum Référencement  » mod Rewrite phpBB  » mod Rewrite Intermédiaire
::  
Auteur Message
yann91



Inscrit le: 21 Oct 2006
Messages: 34

Conflit htaccess joomla/phpbbPosté le: Jeu Fév 08, 2007 3:50 pm    Sujet du message: Conflit htaccess joomla/phpbb

Salut à tous,

J'utilise le mod Rewrite Intermédiaire depuis 3 mois.

Je suis actuellement en train de développer une nouvelle version de mon site j'utilise joomla avec un mod de réécriture des urls.

Voici le htaccess d'origine qui permet la réécriture des articles joomla :

Code:

##
# @version $Id: htaccess.txt 2368 2006-02-14 17:40:02Z stingrey $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
# Only use one of the two SEF sections that follow.  Lines that can be uncommented
# (and thus used) have only one #.  Lines with two #'s should not be uncommented
# In the section that you don't use, all lines should start with #
#
# For Standard SEF, use the standard SEF section.  You can comment out
# all of the RewriteCond lines and reduce your server's load if you
# don't have directories in your root named 'component' or 'content'
#
# If you are using a 3rd Party SEF or the Core SEF solution
# uncomment all of the lines in the '3rd Party or Core SEF' section
#
#####################################################

#####  SOLVING PROBLEMS WITH COMPONENT URL's that don't work #####
# SPECIAL NOTE FOR SMF USERS WHEN SMF IS INTEGRATED AND BRIDGED
# OR ANY SITUATION WHERE A COMPONENT's URL's AREN't WORKING
#
# In both the 'Standard SEF', and '3rd Party or Core SEF' sections the line:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# May need to be uncommented.  If you are running your Joomla! from
# a subdirectory the name of the subdirectory will need to be inserted into this
# line.  For example, if your Joomla! is in a subdirectory called '/test/',
# change this:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# to this:
# RewriteCond %{REQUEST_URI} ^(/test/component/option,com) [NC,OR] ##optional - see notes##
#
#####################################################


##  Can be commented out if causes errors, see notes above.
Options FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On


#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin Standard SEF Section
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]       ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section


########## Begin 3rd Party or Core SEF Section
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]       ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End 3rd Party or Core SEF Section
php_flag register_globals off
php_value session.save_path "/var/www/virtual/area.informatique13.com/htdocs/tmp"


Voici le htaccess qui permet la réécriture des url sur mon forum phpbb :

Code:

RewriteEngine On
RewriteBase /

#########################################################
# PHPBB SEO REWRITE RULES            #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^phpbb/index\.html$ /phpbb/index.php [QSA,L]
# FORUM PROTECTION RULE
# RewriteRule ^phpbb/.*/([^/]+\.html)$ /phpbb/index.php [R=301,L]
# CATEGORIES
RewriteRule ^phpbb/.*-c([0-9]+)\.html$ /phpbb/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^phpbb/.*-f([0-9]+)-([0-9]+)\.html$ /phpbb/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^phpbb/.*-f([0-9]+)\.html$ /phpbb/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^phpbb/topic([0-9]+)-([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^phpbb/topic([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^phpbb/post([0-9]+)\.html$ /phpbb/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^phpbb/membre([0-9]+)\.html$ /phpbb/profile.php?mode=viewprofile&u=$1 [QSA,L]
# END PHPBB PAGES
#####################################################


Ces deux fichiers marchent bien : quand je met le fichier 1 j'arrive à avoir une réécriture d'url sur mes articles joomla, quand je met le fichier 2 j'arrive à avoir une réécriture sur les topic phpbb.
Donc mon problème ne vient pas du serveur ou de mon phpbb qui est modifié pour utiliser les sessions joomla.

Le problème vient quand je met le code du htaccess phpbb a la suite du code du htaccess joomla.
Comme ceci :

Code:

##
# @version $Id: htaccess.txt 2368 2006-02-14 17:40:02Z stingrey $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
# Only use one of the two SEF sections that follow.  Lines that can be uncommented
# (and thus used) have only one #.  Lines with two #'s should not be uncommented
# In the section that you don't use, all lines should start with #
#
# For Standard SEF, use the standard SEF section.  You can comment out
# all of the RewriteCond lines and reduce your server's load if you
# don't have directories in your root named 'component' or 'content'
#
# If you are using a 3rd Party SEF or the Core SEF solution
# uncomment all of the lines in the '3rd Party or Core SEF' section
#
#####################################################

#####  SOLVING PROBLEMS WITH COMPONENT URL's that don't work #####
# SPECIAL NOTE FOR SMF USERS WHEN SMF IS INTEGRATED AND BRIDGED
# OR ANY SITUATION WHERE A COMPONENT's URL's AREN't WORKING
#
# In both the 'Standard SEF', and '3rd Party or Core SEF' sections the line:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# May need to be uncommented.  If you are running your Joomla! from
# a subdirectory the name of the subdirectory will need to be inserted into this
# line.  For example, if your Joomla! is in a subdirectory called '/test/',
# change this:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# to this:
# RewriteCond %{REQUEST_URI} ^(/test/component/option,com) [NC,OR] ##optional - see notes##
#
#####################################################


##  Can be commented out if causes errors, see notes above.
Options FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On


#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin Standard SEF Section
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]       ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section


########## Begin 3rd Party or Core SEF Section
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]       ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End 3rd Party or Core SEF Section
php_flag register_globals off
php_value session.save_path "/var/www/virtual/area.informatique13.com/htdocs/tmp"

#########################################################
# PHPBB SEO REWRITE RULES            #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM PROTECTION RULE
RewriteRule ^phpbb/.+/([^/]+\.html)$ /phpbb/index.php [R=301,L]
# CATEGORIES
RewriteRule ^phpbb/.+-vc([0-9]+)\.html$ /phpbb/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^phpbb/.+-vf([0-9]+)-([0-9]+)\.html$ /phpbb/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^phpbb/.+-vf([0-9]+)\.html$ /phpbb/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^phpbb/topic([0-9]+)-([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^phpbb/topic([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^phpbb/post([0-9]+)\.html$ /phpbb/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^phpbb/membre([0-9]+)\.html$ /phpbb/profile.php?mode=viewprofile&u=$1 [QSA,L]
# END PHPBB PAGES
RewriteRule ^phpbb/sitemaps([0-9]+)\.html$ phpbb/sitemaps.php?c=$1 [QSA,L]
RewriteRule ^phpbb/sitemaps\.html$ phpbb/sitemaps.php [QSA,L]
RewriteRule ^phpbb/forum-m\ap\.html$ phpbb/sitemaps.php?fim [QSA,L]
RewriteRule ^phpbb/forum-m\ap([0-9]+)-([0-9]+)\.html$ phpbb/sitemaps.php?fmp=$1&start=$2 [QSA,L]
RewriteRule ^phpbb/forum-m\ap([0-9]+)\.html$ phpbb/sitemaps.php?fmp=$1 [QSA,L]
RewriteRule ^sitemaps.xml$ /phpbb/sitemap.php [L]
RewriteRule ^phpbb/forum-sitemap-([0-9]+).xml$ phpbb/sitemap.php?fid=$1 [L]
RewriteRule ^phpbb/sitemap-forum.xml$ phpbb/sitemap.php?forum [L]
#####################################################


==>Avec ce fichier quand j'ouvre un forum je suis redirigé vers l'index (de joomla).


J'aimerais faire fonctionner ces deux mods en même temps. Je connais pas le langage employé dans les htaccess donc j'ai besoin de votre aide.

Si ça peut vous aider : Il y a une règle dans le htaccess (donné plus haut) qui permet de rediriger l'utilisateur sur la page d'acceuil si celui ci essaie de visualiser une page qui n'existe pas (erreur 404).

Voici l'adresse du site : http://area.informatique13.com/
l'adresse du forum: http://area.informatique13.com/phpbb/

C'est un site ou je fais mes essaie, il n'est pas encore ouvert officiellement.

Merci, @++
Revenir en haut de page
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Inscrit le: 28 Avr 2006
Messages: 15135

Conflit htaccess joomla/phpbbPosté le: Jeu Fév 08, 2007 4:25 pm    Sujet du message: Re: Conflit htaccess joomla/phpbb

C'est normal, il faut simplement mettre les rewriterules de joomla après celles du forum.

Jommla utilise un .htaccess générique qui renvois tout vers son index, celui de phpBB seo n'utilise que des règle strictes qui n'interfèrent pas avec les autres url possible du serveur.

Donc, ça devrait donner ça :

Code:
php_flag register_globals off
php_value session.save_path "/var/www/virtual/area.informatique13.com/htdocs/tmp"
##  Can be commented out if causes errors, see notes above.
Options FollowSymLinks
RewriteEngine On
RewriteBase /
#########################################################
# PHPBB SEO REWRITE RULES            #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^phpbb/index\.html$ /phpbb/index.php [QSA,L]
# FORUM PROTECTION RULE
# RewriteRule ^phpbb/.*/([^/]+\.html)$ /phpbb/index.php [R=301,L]
# CATEGORIES
RewriteRule ^phpbb/.*-c([0-9]+)\.html$ /phpbb/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^phpbb/.*-f([0-9]+)-([0-9]+)\.html$ /phpbb/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^phpbb/.*-f([0-9]+)\.html$ /phpbb/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^phpbb/topic([0-9]+)-([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^phpbb/topic([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^phpbb/post([0-9]+)\.html$ /phpbb/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^phpbb/membre([0-9]+)\.html$ /phpbb/profile.php?mode=viewprofile&u=$1 [QSA,L]
# END PHPBB PAGES
#####################################################
RewriteRule ^phpbb/sitemaps([0-9]+)\.html$ phpbb/sitemaps.php?c=$1 [QSA,L]
RewriteRule ^phpbb/sitemaps\.html$ phpbb/sitemaps.php [QSA,L]
RewriteRule ^phpbb/forum-m\ap\.html$ phpbb/sitemaps.php?fim [QSA,L]
RewriteRule ^phpbb/forum-m\ap([0-9]+)-([0-9]+)\.html$ phpbb/sitemaps.php?fmp=$1&start=$2 [QSA,L]
RewriteRule ^phpbb/forum-m\ap([0-9]+)\.html$ phpbb/sitemaps.php?fmp=$1 [QSA,L]
RewriteRule ^sitemaps.xml$ /phpbb/sitemap.php [L]
RewriteRule ^phpbb/forum-sitemap-([0-9]+).xml$ phpbb/sitemap.php?fid=$1 [L]
RewriteRule ^phpbb/sitemap-forum.xml$ phpbb/sitemap.php?forum [L]
#####################################################
 ########## Begin Standard SEF Section
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]       ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section
########## Begin 3rd Party or Core SEF Section
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]       ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End 3rd Party or Core SEF Section


Les RegEx du forum son très rapide vu que le trie se fait au niveaux du dossier en premier, tu pourrais aussi inverser le sens en remplaçant :

Code:
RewriteRule (.*) index.php


Par :
Code:
RewriteRule ^([^phpbb/].+)(.*)$ index.php


Note que j'ai remonté les directives php_flag et php_value.

De plus j'ai utilisé le .htaccess du mod rewrite intermédiaire V 0.2.0 et que tu as posté le code des deux versions 0.0.2 et 0.2.0.

Il faudrait ajouter quelques lignes si tu migres depuis un autre mod rewrite en même temps.

++

_________________
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
Revenir en haut de page
Visiter le site web de l'utilisateur
yann91



Inscrit le: 21 Oct 2006
Messages: 34

Conflit htaccess joomla/phpbbPosté le: Jeu Fév 08, 2007 4:42 pm    Sujet du message: Re: Conflit htaccess joomla/phpbb

Oki merci ça marche ^^
Revenir en haut de page
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    phpBB SEO » Forum Référencement  » mod Rewrite phpBB  » mod Rewrite Intermédiaire
Page 1 sur 1

Navigation Autres sujets de discussion

Sauter vers: