Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

how to set the website URL to hit he home page in Cloud AEM

TB3dock
Level 7
Level 7

in AEM we have a home page, e.g. 

/content/site1/en/home.html

we can access this by entering www.oursite.com/content/site1/en/home.html

But if a user hits www.oursite.com they get a blank page.

I am guessing we need to setup some sort of redirect in dispatcher, but didnt find any tutorials for this.  There were different instructions for IIS and apache, but as its cloud, we dont know which if these are being used.

Any suggestions?

We know about apache configuration, so are comfortable with virtual hosts etc, but have no idea about farms.

NOTE: this is for non prod for now.

 

 

1 Accepted Solution
asutosh_jena
Correct answer by
Community Advisor
Community Advisor

Hi @TB3dock 

 

You need to apply a redirect in your dispatcher. Please add the below rule.

 

RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) /content/site1/en/home.html [PT,L]

Thanks! 

View solution in original post

4 Replies
asutosh_jena
Correct answer by
Community Advisor
Community Advisor

Hi @TB3dock 

 

You need to apply a redirect in your dispatcher. Please add the below rule.

 

RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) /content/site1/en/home.html [PT,L]

Thanks! 

View solution in original post

TB3dock
Level 7
Level 7
this is helpful, thanks. I see in the displatcher.cloud dir, are various subdirs, including conf.d and conf.dispatcher.d, enabled_vhosts, rewrites, virtualhosts, filters, etc. Any suggestions as to the best one to add this?
TB3dock
Level 7
Level 7
Interestingly, in apache when using a virtual host, you can set document root so the user doesnt see the horrible url. is this possible?
davidjgonzalezzzz
Level 5
Level 5
Make sure you set a canonical tag on your homepage having it point to the canonical URL for this page, else you will have 2 URLs for your homepage competing against one another for SEO (aka Google will be less sure as to which it should point to)
asutosh_jena
Community Advisor
Community Advisor
You must have a rewrite file for your vhost which will be located under rewrites folder. You can add it there and it should take care of it.