php or js script works correctly only on domain1.com
Can I fool them with .htaccess to think I use domain1.com while actually having domain2.com in url? That is having $_SERVER['SERVER_NAME']; return domain2.com
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(?:www\.)?domain2.com$ [NC]
RewriteRule ^ http://domain1.com%{REQUEST_URI}
These instructions aren't quite working.
source https://stackoverflow.com/questions/71562362/rewrite-domain-url-for-php-script-with-htaccess
No comments:
Post a Comment