PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > RewriteRule - criteria for being applied??
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

RewriteRule - criteria for being applied??

Réponse
 
LinkBack Outils de la discussion
Vieux 30/05/2005, 20h28   #1
Brian Huether
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RewriteRule - criteria for being applied??

I am very confused by Rewrite Rule.

Consider this url:

http://mysite/PNphpBB2-viewforum+f-1...a1cc94bd1.html

Now, here are entries in .htaccess:

RewriteRule ^([^\+]+)-([^-]+)-([^-]*)-([a-zA-Z0-9_]*).html$
index.php?module=$1&func=$2&$3=$4 [L]

RewriteRule ^([^-]+)-([^-]+)\+([^-]+)-([^-]+)\+([^-]+)-([^-]+).html$
index.php?name=$1&file=$2&$3=$4&$5=$6 [L]

I have confirmed that the 1st rule is getting applied because if I remove
it, the rewrite works fine (i.e. the 2nd rule works, but the presence of the
1st one screws things up!).

Can someone please explain why this is happening? I thought a rule would
only get applied if the structure of the url was fitting.?? The first rule
does not have the structure of the above url!!

thanks,

brian


  Réponse avec citation
Vieux 31/05/2005, 12h14   #2
JP. Baker
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: RewriteRule - criteria for being applied??

In article <9OqdnYtvjdKw9AbfRVn-sg@comcast.com>,
Brian Huether <bhuetherNO@comcastSPAM.net> wrote:
>I am very confused by Rewrite Rule.
>
>Consider this url:
>
>http://mysite/PNphpBB2-viewforum+f-1...a1cc94bd1.html
>
>Now, here are entries in .htaccess:
>
>RewriteRule ^([^\+]+)-([^-]+)-([^-]*)-([a-zA-Z0-9_]*).html$


Matches as:
(PNphpBB2)-(viewforum+f)-(10+sid)-(da334d71b15efff1a84eee7a1cc94bd1).html

>RewriteRule ^([^-]+)-([^-]+)\+([^-]+)-([^-]+)\+([^-]+)-([^-]+).html$


Matches as:
(PNphpBB2)-(viewforum)+(f)-(10)+(sid)-(da334d71b15efff1a84eee7a1cc94bd1).html

>I have confirmed that the 1st rule is getting applied because if I remove
>it, the rewrite works fine (i.e. the 2nd rule works, but the presence of the
>1st one screws things up!).
>
>Can someone please explain why this is happening? I thought a rule would
>only get applied if the structure of the url was fitting.?? The first rule
>does not have the structure of the above url!!


Try using a RewriteLog.

--
John P Baker
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h41.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08042 seconds with 10 queries