Score:0

Apache URL Rewrite Rule

us flag
TOM

I'm trying to configure the rewrite rules for my application, my requirement are

  1. /aaa/bbb/ccc/ddd/ -> ./index.php?aaa=$1&bbb=$2&ccc=$3&ddd=$4
  2. /aaa/bbb/ccc/ddd -> ./index.php?aaa=$1&bbb=$2&ccc=$3&ddd=$4
  3. /aaa/bbb/ccc/ -> ./index.php?aaa=$1&bbb=$2&ccc=$3&ddd=
  4. /aaa/bbb/ccc -> ./index.php?aaa=$1&bbb=$2&ccc=$3&ddd=

With the rule only the URL no. 1 & 2 are working, but no. 3 & 4 are not working, may someone can help to correct the rule, thanks in advance!

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(/?)(.*?)$ ./index.php?aaa=$1&bbb=$2&ccc=$3&ddd=$4 [L]
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.