Pb de conflit avec .htaccess et easyphp en local

WRInaute passionné
Bonjour,
Je veux faire quelques test en local d'un forum phpbb et j'ai des soucis avec mon htacess.

J'ai l'erreur Apache suivante : (*** remplacé)

[Fri May 27 11:59:50 2005] [alert] [client 127.0.0.1] c:/program files/easyphp1-7/www/********/forum/.htaccess: Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration

Sans le .htaccess, j'accede à la page index mais les pages forum me renvoie une 404

Avec le .htaccess, j'ai "Internal Server Error"

voici le htaccess :

RewriteEngine On
#
RewriteRule ^forums.* /forum/index.php
RewriteRule ^mforum([0-9]*).* /forum/viewforum.php?f=$1&mark=topics
RewriteRule ^viewforum([0-9]*)-([0-9]*)-([0-9]*).* /forum/viewforum.php?f=$1&topicdays=$2&start=$3
RewriteRule ^forum([0-9]*).* /forum/viewforum.php?f=$1
RewriteRule ^ptopic([0-9]*).* /forum/viewtopic.php?t=$1&view=previous
RewriteRule ^ntopic([0-9]*).* /forum/viewtopic.php?t=$1&view=next
RewriteRule ^stopic([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&watch=topic&start=$2
RewriteRule ^utopic([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&unwatch=topic&start=$2
RewriteRule ^ftopic-([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* /forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4
RewriteRule ^ftopic-([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&start=$2
RewriteRule ^ftopic-([0-9]*).* /forum/viewtopic.php?t=$1
RewriteRule ^ftopic-([0-9]*).html /forum/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5
#
RewriteRule ^ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* /forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4
RewriteRule ^ftopic([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&start=$2
RewriteRule ^ftopic([0-9]*).* /forum/viewtopic.php?t=$1
RewriteRule ^ftopic([0-9]*).html /forum/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5
#
RewriteRule ^setopic-([0-9]*)-([a-zA-Z0-9]*).* /forum/viewtopic.php?t=$1&highlight=$2
RewriteRule ^sutra([0-9]*).* /forum/viewtopic.php?p=$1
RewriteRule ^newtopic([0-9]*).* /forum/viewtopic.php?t=$1&view=newest
#
RewriteRule ^profile([0-9]*).html /forum/profile.php?mode=viewprofile&u=$1
#
RewriteRule ^rtopic-reply([0-9]*).* /forum/posting.php?mode=reply&t=$1
RewriteRule ^rtopic-quote([0-9]*).* /forum/posting.php?mode=quote&p=$1
RewriteRule ^rtopic-new([0-9]*).* /forum/posting.php?mode=newtopic&f=$1
RewriteRule ^vprofil([0-9]*).* /forum/profile.php?mode=viewprofile&u=$1

Apache 1.3.27 , Easyphp 1.7

une idée ? une solution ? je suis preneur :)
 
WRInaute passionné
Tu n'as pas le mod rewrite activé sur ta config apache.
Enfin, en français c'est ce que ça donne.

merci, j'avais traduit :wink:

si tel est le cas, je ne savais pa que le rewrite etait un module spécifique d'apache non présent de base dans easyphp. ce qui serait dommage :(

Bon, je recherche des infos la dessus.
 
WRInaute occasionnel
Si, il est present, mais pas forcement activé.
Voit ta config apache, httpd.conf
Enleve les # que c'est une espece de commentaire
Code:
#LoadModule rewrite_module modules/mod_rewrite.so
#AddModule mod_rewrite.c
il doivent rester comme ça.
Code:
LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c
Et là, tu redemarre le serveur.
Apres tu peux faire ton
RewriteEngine On
Voila
 
WRInaute discret
RewriteEngine On
#
RewriteRule ^forums.* /forum/index.php
RewriteRule ^mforum([0-9]*).* /forum/viewforum.php?f=$1&mark=topics
RewriteRule ^viewforum([0-9]*)-([0-9]*)-([0-9]*).* /forum/viewforum.php?f=$1&topicdays=$2&start=$3
RewriteRule ^forum([0-9]*).* /forum/viewforum.php?f=$1
RewriteRule ^ptopic([0-9]*).* /forum/viewtopic.php?t=$1&view=previous
RewriteRule ^ntopic([0-9]*).* /forum/viewtopic.php?t=$1&view=next
RewriteRule ^stopic([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&watch=topic&start=$2
RewriteRule ^utopic([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&unwatch=topic&start=$2
RewriteRule ^ftopic-([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* /forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4
RewriteRule ^ftopic-([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&start=$2
RewriteRule ^ftopic-([0-9]*).* /forum/viewtopic.php?t=$1
RewriteRule ^ftopic-([0-9]*).html /forum/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5
#
RewriteRule ^ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* /forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4
RewriteRule ^ftopic([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&start=$2
RewriteRule ^ftopic([0-9]*).* /forum/viewtopic.php?t=$1
RewriteRule ^ftopic([0-9]*).html /forum/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5
#
RewriteRule ^setopic-([0-9]*)-([a-zA-Z0-9]*).* /forum/viewtopic.php?t=$1&highlight=$2
RewriteRule ^sutra([0-9]*).* /forum/viewtopic.php?p=$1
RewriteRule ^newtopic([0-9]*).* /forum/viewtopic.php?t=$1&view=newest
#
RewriteRule ^profile([0-9]*).html /forum/profile.php?mode=viewprofile&u=$1
#
RewriteRule ^rtopic-reply([0-9]*).* /forum/posting.php?mode=reply&t=$1
RewriteRule ^rtopic-quote([0-9]*).* /forum/posting.php?mode=quote&p=$1
RewriteRule ^rtopic-new([0-9]*).* /forum/posting.php?mode=newtopic&f=$1
RewriteRule ^vprofil([0-9]*).* /forum/profile.php?mode=viewprofile&u=$1

Juste une question SVP
Il n'y a pas de Flags ????
Où faudrait-il placer tous les [L] ou [QSA,L] dans ce type de .htaccess
Merci
 
WRInaute occasionnel
Je viens de te repondre par MP

RewriteEngine On
#
RewriteRule ^forums.* /forum/index.php [L]
RewriteRule ^mforum([0-9]*).* /forum/viewforum.php?f=$1&mark=topics [L]
RewriteRule ^viewforum([0-9]*)-([0-9]*)-([0-9]*).* /forum/viewforum.php?f=$1&topicdays=$2&start=$3 [L]
RewriteRule ^forum([0-9]*).* /forum/viewforum.php?f=$1 [L]
RewriteRule ^ptopic([0-9]*).* /forum/viewtopic.php?t=$1&view=previous [L]
RewriteRule ^ntopic([0-9]*).* /forum/viewtopic.php?t=$1&view=next [L]
RewriteRule ^stopic([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&watch=topic&start=$2 [L]
RewriteRule ^utopic([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&unwatch=topic&start=$2 [L]
RewriteRule ^ftopic-([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* /forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L]
RewriteRule ^ftopic-([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&start=$2 [L]
RewriteRule ^ftopic-([0-9]*).* /forum/viewtopic.php?t=$1 [L]
RewriteRule ^ftopic-([0-9]*).html /forum/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L]
#
RewriteRule ^ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* /forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L]
RewriteRule ^ftopic([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&start=$2 [L]
RewriteRule ^ftopic([0-9]*).* /forum/viewtopic.php?t=$1 [L]
RewriteRule ^ftopic([0-9]*).html /forum/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L]
#
RewriteRule ^setopic-([0-9]*)-([a-zA-Z0-9]*).* /forum/viewtopic.php?t=$1&highlight=$2 [L]
RewriteRule ^sutra([0-9]*).* /forum/viewtopic.php?p=$1 [L]
RewriteRule ^newtopic([0-9]*).* /forum/viewtopic.php?t=$1&view=newest [L]
#
RewriteRule ^profile([0-9]*).html /forum/profile.php?mode=viewprofile&u=$1 [L]
#
RewriteRule ^rtopic-reply([0-9]*).* /forum/posting.php?mode=reply&t=$1 [L]
RewriteRule ^rtopic-quote([0-9]*).* /forum/posting.php?mode=quote&p=$1 [L]
RewriteRule ^rtopic-new([0-9]*).* /forum/posting.php?mode=newtopic&f=$1 [L]
RewriteRule ^vprofil([0-9]*).* /forum/profile.php?mode=viewprofile&u=$1 [L]

Voila la bonne façon normalement
 
Discussions similaires
Haut