I've been trying to accomplish this type of redirection with .htaccess yet I cannot figure out the correct way of doing so (after searching google for a while):
test.example.com/more -> example.com/test.php?o=more
I tried to do the following:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*)\.example\.com
RewriteRule ^(.*)\.example\.com/(.*)$ $1.php?o=$2 [L,NC,QSA]
I'm not very understanding on how .htaccess fully works so any help with this would be appreciated.