Thursday, 24 August 2023

apache2 redirect

 go to your sites

mysites-ssl.conf

then adda 


    # Redirect

        RedirectMatch 301 /newUrl(.*) http://destination.com$1


mydomain.com/newUrl will be redirected to http://destionation.com


and $1 means anything after /newUrl will be mapped after http://destionation.com


like mydomain.com/newUrl/test will be mapped to http://destionation.com/test


https://httpd.apache.org/docs/2.4/mod/mod_alias.html

No comments:

Post a Comment