1

The stuff after the #### are just to tell you what I am doing and it's not actually part of my ssl.conf file

Trying to modify an ssl.conf configuration to do the following...

RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/(.*) https://misc.org/scores [L,R=301] 
# takes misc.org and makes it misc.org/scores

#1 
RewriteRule ^/scores/liverpool https://misc2.org/liverpool2 [L,R=301]
# redirect for '/scores/liverpool to misc2.org/liverpool2' works

#2 
RewriteRule ^/scores/liverpool/child https://misc2.org/liverpool2/child [L,R=301]
# only redirects to /misc2.org/liverpool2 and never makes it to /misc2.org/liverpool2/child

If I comment out #1...#2 works but I need both to work.

What am I missing?

Thanks in advance

marked as duplicate by Jenny D, Tommiie, kubanczyk, peterh, Paul Gear Jun 13 at 23:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    You're putting them in the wrong order. Put the most specific one first. – Jenny D May 22 at 7:30
0

Try to put rule #2 before rule #1 as rule #1 already matches path /scores/liverpool/child which is then redirected to https://misc2.org/liverpool2.

Or alternatively remove rule #1 and #2 and use instead:

RewriteRule ^/scores/liverpool(.*) https://misc2.org/liverpool2$1 [L,R=301]

Not the answer you're looking for? Browse other questions tagged or ask your own question.