Hey there
My issue is the following:
I have a windows-based xampp-apache server with which I would like to make sub-sub domain redirects to subdirectory:
I have a domain, for which on the cpanel I've made an A-record to my IP address:
The sub domain is *.dev.bestudion.net.
Whay I want to have is:
the ability to redirect to the sites on the developin side like:
to the help-me.com site which is under development to be able to acces through this link:
help-me.com.dev.bestudion.net.
the subdirectory where it stands is: <root> /dev/help-me.com
I have almost done the script, just the last time what I made, did an infinite loop of redirects:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.dev\.bestudion\.net
RewriteCond %{HTTP_HOST} ([^.]+)\.dev\.bestudion\.net [NC]
RewriteRule ^(.*)$ http://%1.dev.bestudion.net/dev/%1 [L,R]
I've made a code, which works with linux based apache, but not windows:
RewriteEngine On
RewriteCond %{HTTP_HOST} ([-_a-z0-9.]+)\.dev\.bestudion\.net
RewriteRule ^(.*)$ /dev/%1/$1 [L]
Anybody, an idea?