Hello, dead simple question I'm sure, just trying to understand what's going on.
I'm using an Apache 2 server, I have this in my .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.) [NC]
RewriteRule ^http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This request in a browser:
http-//mydomain.com/thepage
is redirected to:
http-//www.mydomain.com/thepage.php
(I've used a - instead of a : above just to stop them appearing as actual urls)
What I just have to find out is, where is the '.php' part coming from? I do not understand that at all and it's counter to how I thought it worked. Yes the thepage's actual file name on the server is thepage.php but surely the text which the above Rewrite cond and rule is working on is the request URL?; obviously not, because the request URL does not contain '.php'.
Thanks.