When I use PT or L flag, my URL shortening is not working. It only works with R flag. R flag is for URL redirecting, but I need internal rewrite. I am using apache 2.2 on Linux. I have mode_rewrite.so and mod_proxy.so in my modules directory.
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/content/dam
RewriteRule ^/(.*) /content/dam/$1 [L]
I am trying to shorten URL from
http://serverx.epga.nam.com:15100/content/dam/parts/images/22787711_Primary.jpg
to
http://serverx.epga.nam.com:15100/parts/images/22787711_Primary.jpg
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
typically, the user would enter the shortened URL: http://serverx.epga.nam.com:15100/parts/images/22787711_Primary.jpg which would then get rewritten to the full path in Dispatcher: /content/dam/parts/images/22787711_Primary.jpg this expanded URL would then be passed onto AEM (if it was not already cached)
Shortening URL's from /content/dam/parts/images/22787711_Primary.jpg to /parts/images/22787711_Primary.jpg is done during rendering
Also check your dispatcher log file, you can increase the level of logging to get more details.
Regards,
Opkar
Views
Replies
Total Likes
Hi Vishal,
Here are the very nice docs which explain each & every in details. Try below
https://httpd.apache.org/docs/2.2/rewrite/flags.html
RewriteEngine on
RewriteCond %
RewriteRule ^/(
Jitendra
Views
Replies
Total Likes
[EDITED]
Hi
Some reference links to start with :-
Link:- https://docs.adobe.com/docs/en/dispatcher/disp-domains.html#AEM Rewrites Incoming URLs
The Dispatcher cache mirrors the repository node structure. Therefore, when page activations occur the resulting requests for invalditing the cached page require no URL or path translations.
Link:- http://stackoverflow.com/questions/21662780/how-sling-rewriter-works-clarification
Link:- https://www.cognifide.com/our-blogs/cq/multidomain-cq-mappings-and-apache-configuration/
// This post is intended to serve as a quick referecnce document wherein you can learn how to configure 3 language versions of the well-known Geometrixx site to work on 3 domains: geometrixx.com, geometrixx.de and geometrixx.fr
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Hi,
typically, the user would enter the shortened URL: http://serverx.epga.nam.com:15100/parts/images/22787711_Primary.jpg which would then get rewritten to the full path in Dispatcher: /content/dam/parts/images/22787711_Primary.jpg this expanded URL would then be passed onto AEM (if it was not already cached)
Shortening URL's from /content/dam/parts/images/22787711_Primary.jpg to /parts/images/22787711_Primary.jpg is done during rendering
Also check your dispatcher log file, you can increase the level of logging to get more details.
Regards,
Opkar
Views
Replies
Total Likes