Dispatcher Serves the Cached content only | Community
Skip to main content
New Participant
November 11, 2015
Solved

Dispatcher Serves the Cached content only

  • November 11, 2015
  • 2 replies
  • 843 views

I am trying to access the Geometrixx URL from the Dispatcher Server

 

When I make the first request to the page 

http://localhost:8087/content/geometrixx-outdoors/en.html I see the page and HTML is cached.

 

When I delete the cached copy and try to hit http://localhost:8087/ I get:

 The requested URL /content/geometrixx-outdoors/en.html was not found on this server.

 

So unless the /en.html copy is cached, I cannot see the page.

 

Following are the Rewrite URL and dispatcher settings I am using:

 

<VirtualHost *:8087>

 DocumentRoot /Library/WebServer/Documents

 RewriteEngine On

 RewriteRule ^/$ /content/geometrixx-outdoors/en.html [PT]

 RewriteCond %{REQUEST_URI} !^/apps/(.*) [NC]

 RewriteCond %{REQUEST_URI} !^/etc(.*) [NC]

 RewriteCond %{REQUEST_URI} !^/libs(.*) [NC]

 RewriteCond %{REQUEST_URI} !^/content(.*) [NC]

 RewriteCond %{REQUEST_URI} !^/system(.*) [NC]

 RewriteCond %{REQUEST_URI} !^/dam(.*) [NC]

 RewriteCond %{REQUEST_URI} !^/searchservice(.*) [NC]

RewriteCond %{REQUEST_URI} !^/store(.*) [NC]

 RewriteCond %{REQUEST_URI} !^/services(.*) [NC]

 RewriteRule ^/(.*) /content/corp/en_us/$1 [PT] 

 

</VirtualHost>

 

  /0023 { /type "allow" /url "/content*" }  # disable this rule to allow mapped content only

 

On the Dispatcher log : when I try to access en.html which is not cached , I see

  request URL has no extension: /

cache-action for [/]: NONE

Filter rejects: GET / HTTP/1.1

 

I could not understand if dispatcher rejects the request (http://localhost:8087/) when page is not cached, why or how would it serve the page when it is cached?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

You can have the filter in dispatcher.any  [0] but it open access to all types and security risk is involved. 

Workaround would be either use [R] Or you can use Directory. In dispatcher.conf comment out [1] and add [2]. Let me know if issue resolve at your end by adding [2].

 

[0] { /type "allow" /glob "*/*" }


[1] RewriteRule ^(/)$ /content/geometrixx-outdoors/en.html [R]

[2]
<Directory "<cachedirectorypath>/htdocs">
RewriteEngine on
RewriteRule ^()$ /content/geometrixx-outdoors/en.html [PT]
</Directory>

2 replies

New Participant
November 11, 2015

Thanks for the suggestion ,  when I add the <Directory "/Library/WebServer/Documents/htdocs"> and tried to restart the server I see syntax errors. 

 

If I comment out [1] and add the rewrite url rule [2]  in the <VirtualHost *:8087> I see :  The requested URL /content/corp/en_us/ was not found on this server.

Sham_HC
Sham_HCAccepted solution
New Participant
November 11, 2015

You can have the filter in dispatcher.any  [0] but it open access to all types and security risk is involved. 

Workaround would be either use [R] Or you can use Directory. In dispatcher.conf comment out [1] and add [2]. Let me know if issue resolve at your end by adding [2].

 

[0] { /type "allow" /glob "*/*" }


[1] RewriteRule ^(/)$ /content/geometrixx-outdoors/en.html [R]

[2]
<Directory "<cachedirectorypath>/htdocs">
RewriteEngine on
RewriteRule ^()$ /content/geometrixx-outdoors/en.html [PT]
</Directory>