R
R
Ragtime Kitty2020-08-16 17:05:40
Apache HTTP Server
Ragtime Kitty, 2020-08-16 17:05:40

How to change the root folder for a subdomain?

There is a file apples.example.com/index.html

There is a link in this file How do I make this link point to example.com instead of apples.example.com? <a href="/">link</a>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
wisgest, 2020-12-14
@wisgest

Check Referer to see if a link was clicked on apples.example.com/index.html and redirect if it matches:

RewriteCond %{HTTP_REFERER} ^https?://apples\.example\.com/index\.html(?:$|\?)
RewriteRule ^$ http://example.com/

W
Weefix, 2020-08-16
@Weefix

The only way I suggest is: Only, this needs to be changed if you are changing the domain. <a href="example.com">link</a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question