I have configured one of the web-instance configuration files with the below snippet to allow redirects to work through another file without the need to restart the server.
RewriteMap redirects txt:/mnt/var/www/html/abc/content/abc/na/ac/config_en_us/redirects/redirects.txt
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond ${redirects:%1} >""
RewriteRule ^(.*)$ ${redirects:%1} [R=301,NC,L]
When trying to restart the httpd after putting the code snippet i am not able to start the apache. The same code is working on other servers. Also the file was created and i have validated the permission.
below is the error statement
Syntax error on line 69 of /etc/httpd/conf.d/abc.conf: RewriteMap: file for map redirects not found:/mnt/var/www/html/abc/content/abc/na/ac/config_en_us/redirects/redirects.txt
I was finally able to bring the server up but the fix was not correct. Here is what i did.
I created the same file with the same name in a the path /etc/httpd/conf.d and then moved it to the required path, after which apache was able to find the file and did come up. Can anyone help me understand what happened.
ls -lon the given path to see what error you get. You need to check the permission of each element in the path, not just for the filename.