0

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?

3
Contributors
3
Replies
5
Views
6 Years
Discussion Span
Last Post by gtec
0

//EDIT sorry reread your question and I misinterpreted.

wondering whether you were using Apache or IIS (just saw the xampp bit).

Edited by diafol: n/a

0

//EDIT sorry reread your question and I misinterpreted.

wondering whether you were using Apache or IIS (just saw the xampp bit).

Apache with XAMPP

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.