I'm not entirely sure if this is possible and tried searching but couldn't find the exact answer to my current situation.
I'm building a service which should allow users to point their own domain to the service. (they need to point an A record towards my server ip)
I'm able to catch the domain using the catch all in apache. So I made a Vhost record for this catch all in httpd.conf. So all not-defined hostnames in apache are pointed towards a certain directory.
Now I would like to pass this domain as a parameter to my service. So is it possible to point this.randomdomain.com to www.mywebserviceurl.com/domain/catch/this.randomdomain.com with .htaccess
The address bar should keep the url this.randomdomain.com
Edit:
RewriteEngine On
RewriteRule ^(.*)$ http://example.com/blogs/string/$1 [R=301]
The above is redirecting but firefox trows an error "The page isn't redirecting properly - Firefox has detected that the server is redirecting the request for this address in a way that will never complete." And the address is changing which I don't want.
thanks!