Situation:
I have a wordpress website on my domain newpapa.br-workshop.purplepanda.be (staging)
I have a few domains redirecting with a CNAME or A-records (like in this example: papatest.purplepanda.be
When I go to papatest.purplepanda.be/final-test, I want to redirect to the page ‘/blackbear-test-page/’ on my WordPress website (on same IP because the last domain is connected through DNS records to the first one). Im doing this in my htacces file with:
#DOMAIN REWRITE papatest.purplepanda.be/final-test
RewriteEngine On
RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^papatest.purplepanda.be/final-test$ [NC]
RewriteRule ^ https://newpapa.br-workshop.purplepanda.be/blackbear-test-page/ [L]
This all works!
The problem:
I want to keep the original url (papatest.purplepanda.be/final-test) in the adressbar, after the redirect to https://newpapa.br-workshop.purplepanda.be/blackbear-test-page/
Disclaimer
I already looked online, and looked like the anwser was easy: changing [L, R=301] to [L], but that didn’t fix the problem.
The solutions in the first 4 threads popping up did not work for me.
Gert-Jan Feijens is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.