Change Document_root on Add Subdomains (DirectAdmin)

emfa

New member
Joined
Nov 29, 2018
Messages
8
Hi Dear Experts
as you can see the attached photo >> https://cdn.pbrd.co/images/HPt1FHh.jpg (photo)
I need to :
1- create subdomain
2- and change the Document Root Folder

for example :
change this subdomain "photo.example.com's Document Root to >> /wp-content/uploads/

how can I reach this in directadmin .
I dont need any redirections , I need exactly this option , point to the document directory...


tnx in advance
Mansoor
 

emfa

New member
Joined
Nov 29, 2018
Messages
8
hi tnx for reply
I used this before , and the problem solved BUT
sometimes in browser and httpcheckers , tell me that this page has "too many REDIRECTS"

i think this to many redirects WARNING make issus for us in earlier times. isn't it ?
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
Redirects might occur when you have mod_rewrite rules under public_html or private_html, the rules from parent folder are also working for a subdomain in your case.
 

emfa

New member
Joined
Nov 29, 2018
Messages
8
Redirects might occur when you have mod_rewrite rules under public_html or private_html, the rules from parent folder are also working for a subdomain in your case.
tnx again , let me describe my reason to do this.
if u saw the first picture that i send through first post of this topic, I have to create a new subdomain for static (cookieless) domain for my static files(images/css/js).
if I change the DOCUMENT's ROOT for that subdomain, my wp_rocket can use CNAME for replacing as CDN and replace this root address with my subdomain, for example : cdn.example.com

if I have 70 files on my page i think it occurs too much redirects , but the urls were rewrite and shows the files correctly in the webpage, but I have to find out why some web tools tell me this is too much redirections.
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
It would help us if you provide a link to such image/css/js file. So that we could test it ourselves.
 

emfa

New member
Joined
Nov 29, 2018
Messages
8
It would help us if you provide a link to such image/css/js file. So that we could test it ourselves.
yeah sure,
plz check out our address here
you can check the images/js/css on this page were addressed with cdn1.example.. / cdn.example

tnx dear
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
Well, I don't see any error saying too many redirects. How to re-produce the error? What browser should I use for it?
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
Check your mod rewrite rules, I don't have any other ideas.

Too many redirects might occur when you use for example Varnish and redirect requests from HTTP -> HTTPS, and mod rewrite checks for 443 port, etc.

You've closed your real URLs. Sorry, no time for playing a guess game.
 

emfa

New member
Joined
Nov 29, 2018
Messages
8
Check your mod rewrite rules, I don't have any other ideas.

Too many redirects might occur when you use for example Varnish and redirect requests from HTTP -> HTTPS, and mod rewrite checks for 443 port, etc.

You've closed your real URLs. Sorry, no time for playing a guess game.
Ok dear Zeiter tnx for ur attention ...
:x
 
Top