sling url rewrite가 어떻게 작동하는지 이해하려고합니다. 나는이 URL을 다음과 같은거야 -sling rewriter가 어떻게 작동하는지 설명합니다.
http://www.cognifide.com/blogs/cq/multidomain-cq-mappings-and-apache-configuration/
단계 나는 환경을 게시에서 수행 한 -
/etc/map.publish/http :
jcr: primaryType: "sling:OrderedFolder",
home: {
sling:internalRedirect: ["/content/geometrixx/en.html"],
jcr:primaryType: "sling:Mapping",
sling:match: "localhost:4503/$"
},
localhost.4503: {
sling:internalRedirect: ["/content/geometrixx/en"],
jcr:primaryType: "sling:Mapping",
redirect: {
sling:internalRedirect: ["/content/geometrixx/en/$1","/$1"],
jcr:primaryType: "sling:Mapping",
sling:match: "(.+)$"
}
}
1) 그러나, 나는이 URL을 쳤다 :
http://localhost:4503/products.html then I got 404 error.
2) 또한,
http://localhost:4503/content/geometrixx/en.html then it should open
http://localhost:4503/en/products.html.
알려 주시기 바랍니다는 위의 방법을
업데이트에 따라 수 있습니다 : URL은 내가 디스패처를 통해 액세스하려고 해요 합니다. Windows 7, CQ5.6.0에서 Apache 2.0을 사용하고 있습니다. 로컬 호스트/컨텐츠/geometrixx/EN/products.html는 내가 페이지를 얻을 디스패처 또한 페이지를 캐시 : 나는 쳤을 때 지금)
<IfModule disp_apache2.c>
DispatcherConfig conf/dispatcher.any
DispatcherLog logs/dispatcher.log
DispatcherLogLevel 3
DispatcherNoServerHeader 0
DispatcherDeclineRoot 0
DispatcherUseProcessedURL 0
DispatcherPassError 0
</IfModule>
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/Apache2/htdocs/content/sitea"
RewriteEngine On
RewriteRule ^/$ /content/geometrixx/en.html [PT,L]
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
RewriteRule ^/(.*)$ /content/geometrixx/en/$1 [PT,L]
<Directory "C:/Apache2/htdocs/content/sitea">
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On
</IfModule>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
3 - 내 httpd.conf 파일은 다음과 같습니다. 그러나 예를 들어 제품 -> 삼각형에 대한 페이지로 이동 한 후 URL은 슬링 매핑으로 인해 localhost : 4503/products/triangle.html이됩니다. 기대 되니? 디스패치는 슬링 매핑에 대해 알지 못하므로 triangle.html을 캐시하지 않습니다. Dispatcher 캐시 작업을 수행하는 방법은 무엇입니까?
4) 필자가이 url localhost/triangle.html을 치면 필자는 rewriter 규칙 (RewriteRule ^/(. *) $/content/geometrixx/en/$ 1 [PT, L] localhost/content/geometrixx/en/triangle.html과 같은 적절한 페이지가 있지만 404 오류가 발생합니다.
누군가 도와주세요. –