I'm trying to compare the HTTP_HOST
with my domain name which failed. Struggling to find out what causes this, I tried to print the length of it. To my surprise it outputs the length of my actual domain name (although I am using a web proxy).
Using strlen
I would receive the same length as in this var_dump()
output (showing only what's necessary):
["HTTP_HOST"]=>
string(12) "mydomain.com.s48.wbprx.com"
["SERVER_NAME"]=>
string(12) "mydomain.com.s48.wbprx.com"
My original domain was replaced with mydomain.com including the length of the string.
I am very stunned, how come I can print the string using echo and see it in its whole, but not get the string length? Even when I did str_replace('.','', $str)
it would return me "mydomaincom"
If it is to any help my website also uses the following htaccess code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Removes .php
RewriteCond $1 !\.(gif|jpe?g|png|bmp)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]
</IfModule>
I've tried with both .php and without. Same result.
This result was produced using: https://incloak.com/
My PHP version is 5.3.14
if that would make any difference.