Expand my Community achievements bar.

Page not cache to the particular folder in dispatcher

Avatar

Level 3

Hi All,

            I have implemented extension less url and I have set the document root to stored to the pages. Before extension less implementation cache page stored in specific  content/ project folder  but now it stored in the root level. I am not sure this issue is due to that extension less.

below are the changes that I did 

DocumentRoot /mnt/var/www/html

RewriteRule ^/$ /content/project/au/homepage.html [PT,L]
RewriteCond %{REQUEST_URI} \.html$
RewriteRule ^/(.*).html$ /$1/ [R=301,L,QSA]
#Append the .html for those URL's ending with / before sending to publisher
RewriteCond %{REQUEST_URI} !^/$
RewriteRule ^/(.*)/$ /$1.html [PT,L,QSA]

RewriteCond %{REQUEST_URI} !^/apps
RewriteCond %{REQUEST_URI} !^/content
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/home
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/tmp
RewriteCond %{REQUEST_URI} !^/var
RewriteCond %{REQUEST_URI} !^/bin


# Everything Else Passthrough
RewriteRule ^/(.*)$ /content/project/au/homepage/$1 [PT,L]
</IfModule>

 

 

also etc/mapping changes 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:mixinTypes="[cq:ReplicationStatus]"
jcr:primaryType="sling:Mapping"
sling:internalRedirect="/content/project/au/homepage/(.*).html"
sling:match="$1/"/>

 

savi50_0-1645000227028.png

see below child page showing in the root level instead of content /project

savi50_1-1645000342016.png

 

 

4 Replies

Avatar

Community Advisor

@savi50 Can you update the DocumentRoot path to your project specific directory instead of default path.

DocumentRoot /mnt/var/www/html -> default path

DocumentRoot /mnt/var/www/html/<project> -> Project specific path.

 

Also check the DocumentRoot configuration in the farm file (t should be same as vhost)

 

Regards,

Raja

Avatar

Level 3

Hi @Raja-kp ,

                             I already tried this approach but it is not working. it is showing permission issue whenever access the page.

Avatar

Community Advisor

@savi50 Can you tail the dispatcher logs when you access the page and let us know the page response ? 

 

Regards,

Raja