[resolu]Pb de redirection

Le forum de support du mod de réécriture d'URL pour phpBB3 en version Avancée.
Ce mod de réécriture d'url injecte les titres forums et des sujets dans leurs URLs.

Modérateur: Modérateurs

[resolu]Pb de redirection

Messagede florent » Mer Jan 16, 2008 9:37 pm

Bonjour,
Je suis passé du mod simple au mod avancé et j'ai combiné les deux htaccess de façon à conserver l'acces aux anciennes pages referencées mais ça ne fonctionne pas. Pourriez vous me dire ce qui ne va pas ds mon htaccess:
[edit] j'ai egalement le mod zero duplicate
Code: Tout sélectionner
# 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>

# 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
RedirectPermanent /forum http://www.tekno-enjoy.com
RewriteCond %{HTTP_HOST} ^tekno-enjoy.com$
RewriteRule ^(.*)   http://www.tekno-enjoy.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 WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET AS FORUM INDEX
    # RewriteRule ^forum\.html$ /index.php [QSA,L,NC]
    # FORUM
    RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([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 ^annonces/[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?t=$1&start=$3 [QSA,L,NC]
    # PROFILES SIMPLE
    RewriteRule ^membre([0-9]+)\.html$ /memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
    # USER MESSAGES SIMPLE
    RewriteRule ^messages([0-9]+)(-([0-9]+))?\.html$ /search.php?author_id=$1&sr=posts&start=$3 [QSA,L,NC]
    # GROUPS SIMPLE
    RewriteRule ^groupe([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]
    # THE TEAM
    RewriteRule ^equipe\.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_-]+(-([0-9]+))?\.html$ /viewforum.php?start=$2 [QSA,L,NC]
    # END PHPBB PAGES
    #####################################################

#####################################################
# PHPBB SEO REWRITE RULES - SIMPLE
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET As FORUM INDEX
# RewriteRule ^forum\.html$ /index.php [QSA,L,NC]
# FORUM
RewriteRule ^forum([0-9]+)(-([0-9]+))?\.html$ /viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^forum([0-9]+)/topic(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^annonces/topic([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^[a-z0-9_-]*/?topic([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^membre([0-9]+)\.html$ /memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# THE TEAM
RewriteRule ^equipe\.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_-]+(-([0-9]+))?\.html$ /viewforum.php?start=$2 [QSA,L,NC]
# END PHPBB PAGES
#####################################################

################################## Errors ######################################
#ErrorDocument 301 /error/301-moved_permanently.html
#ErrorDocument 302 /error/302-moved_temporarily.html
#ErrorDocument 303 /error/303-see_other.html
#ErrorDocument 400 /error/400-bad_request.html
ErrorDocument 401 /error/401-authorization_required.html
#ErrorDocument 402 /error/402-payment_required.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-not_found.html
#ErrorDocument 405 /error/405-method_not_allowed.html
#ErrorDocument 406 /error/406-not_acceptable.html
#ErrorDocument 407 /error/407-proxy_authentication_required.html
ErrorDocument 408 /error/408-request_timed_out.html
#ErrorDocument 409 /error/409-conflicting_request.html
#ErrorDocument 410 /error/410-gone.html
#ErrorDocument 411 /error/411-content_length_required.html
#ErrorDocument 412 /error/412-precondition_failed.html
#ErrorDocument 413 /error/413-request_entity_too_long.html
#ErrorDocument 414 /error/414-request_uri_too_long.html
#ErrorDocument 415 /error/415-unsupported_media_type.html
ErrorDocument 500 /error/500-internal_server_error.html
#ErrorDocument 501 /error/501-not_implemented.html
#ErrorDocument 502 /error/502-bad_gateway.html
ErrorDocument 503 /error/503-service_unavailable.html
#ErrorDocument 504 /error/504-gateway_timeout.html
#ErrorDocument 505 /error/505-http_version_not_supported.html
################################################################################

######################### Howto map /~user to /user ############################
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/([^/]+)$
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^([^/]+)$ http://%{SERVER_NAME}/$1/ [R,L]
RewriteCond %{REQUEST_URI} ^/([^/]+)/
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^([^/]+)(.+)$ http://%{SERVER_NAME}/~$1/$2
################################################################################

###################### Howto map /users/user to /users/user ####################
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/users/([^/]+)$
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^users/([^/]+)$ http://%{SERVER_NAME}/users/$1/ [R,L]
RewriteCond %{REQUEST_URI} ^/users/([^/]+)/
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^users/([^/]+)(.+)$ http://%{SERVER_NAME}/~$1/$2
################################################################################


post fonctionne, c'est topic qui ne fonctionne pas
Merci
Dernière édition par florent le Ven Jan 18, 2008 2:34 pm, édité 1 fois.
florent
 
Messages: 2
Inscription: Mer Jan 16, 2008 6:05 pm

Publicité

Messagede dcz » Ven Jan 18, 2008 9:34 am

Il vaudrait mieux mettre les rewriterules de phpBB à la fin de ton .htaccess, après ce que tu avais déjà.

Ensuite, prends juste le .htaccess avancé, et ajoutes :

Code: Tout sélectionner
# FORUM
RewriteRule ^forum([0-9]+)(-([0-9]+))?\.html$ /viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*/?topic([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]


Après :
Code: Tout sélectionner
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES


Ça doit suffire vu que tu n'as pas changé les autres urls.

++
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
 
Messages: 21407
Inscription: Ven Avr 28, 2006 9:03 pm

Messagede florent » Ven Jan 18, 2008 2:34 pm

Tres bien merci beaucoup :)
florent
 
Messages: 2
Inscription: Mer Jan 16, 2008 6:05 pm


Retourner vers Réécriture URL Avancée

 


  • Articles en relation
    Réponses
    Vus
    Dernier message

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 6 invités