I have a RewriteCond on prod as below
RewriteCond %{HTTP_HOST} ^www\.myprodsite\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/apps
RewriteCond %{REQUEST_URI} !^/bin
RewriteCond %{REQUEST_URI} !^/content
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/home
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/saml_login
RewriteCond %{REQUEST_URI} !^/system
RewriteCond %{REQUEST_URI} !^/tmp
RewriteCond %{REQUEST_URI} !^/var
RewriteRule ^/(.*)$ /content/mysite/$1.html [PT,L]
This Rule is not executed when I hit links like www.myprodsite.com/test
If I keep everything same except the url in dev environment then it works fine as below
RewriteCond %{HTTP_HOST} ^mysite-dev\.adobecqms\.net$ [NC]
Hence link like www.mysite-dev.adobecqms.net/test gets redirected to www.mysite-dev.adobecqms.net/content/mysite/test.html
Also other rules in the same prod file works fine.
How can we check the logs for the dispatcher in Adobe AMS?
Do we have to do any changes on prod to allow any domain specific conditions?
Solved! Go to Solution.
Views
Replies
Total Likes
This looks like a general mod_rewrite issue. On your dispatcher ... you'll want to turnout debugging in mod_rewrite and it'll log all checks above into a file. From there you'll see which rules pass as well as fail.
ref: https://httpd.apache.org/docs/current/mod/mod_rewrite.html#logging
LogLevel alert rewrite:trace3
RewriteEngine on
This looks like a general mod_rewrite issue. On your dispatcher ... you'll want to turnout debugging in mod_rewrite and it'll log all checks above into a file. From there you'll see which rules pass as well as fail.
ref: https://httpd.apache.org/docs/current/mod/mod_rewrite.html#logging
LogLevel alert rewrite:trace3
RewriteEngine on
The mod_rewrite log levels are defined by the variable REWRITE_LOG_LEVEL in the file conf.d/variables/global.var
.
It can be set to error, warn, info, debug and trace1 - trace8, with a default value of warn. To debug your RewriteRules, it is recommended to raise the log level to trace2.
For debugging puposes, you can set following in /conf.d/variable/global.vars
Define REWRITE_LOG_LEVEL trace2
To set the log level per environment, use the appropriate conditional branch in the global.var file, as described below:
Define REWRITE_LOG_LEVEL debug
<IfDefine ENVIRONMENT_STAGE>
...
Define REWRITE_LOG_LEVEL warn
...
</IfDefine>
<IfDefine ENVIRONMENT_PROD>
...
Define REWRITE_LOG_LEVEL error
...
</IfDefine>
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies