I tried for hours to redirect every pages of a folder to new url, matching the folder but it seems I definitely do not understand nothing to regex and redirect !
I want to redirect any pages into the folder /folder/ to a totally different url
Something like
RedirectMatch 301 ^/folder$ https://www.mynewdomain.com/id/2176
in order to redirect https://www.myolddomain.com/folder/123.html
to https://www.mynewdomain.com/id/2176
I do not want to keep anything of previous url, just redirect any page of this folder to a specific url.
Someone can help ?
Thanx
I tried
RewriteEngine On
RewriteRule /folder/ https://www.mynewdomain.com/id/2176
but it do not work, i am not redirected when i reach an url containing /folder/. Tried
RewriteRule ^/folder(/)?$ https://www.mynewdomain.com/id/2176 [R=301,L]
Tim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.