Hello,
I’ve run into a peculiar problem. Our IT department got an alert logic notice about our Omeka-S site because it’s accessible via IP (and bypasses cloudflare), so they asked us to have the IP redirect to the domain in .htaccess using this directive, which I’ve seen as the common method:
RewriteCond %{HTTP_HOST} ^xxx\.xx\.x\.xx$
RewriteRule ^(.*)$ https://oursite.edu/$1 [R=301,L]
HOWEVER, when I applied it seems to conflict the omeka’s own rewriterule to index.php, ie:
RewriteCond %{ENV:REDIRECT_OMEKA_REQ} !"1"
RewriteRule ^(.*)$ %{ENV:BASE}/index.php [E=OMEKA_REQ:"1",L]
So when I go to IP address for the site it takes me to https://oursite.edu/index.php. However, that gives me a 404 ‘Page not found’ error. I also tested the index.php on the sandbox and get same error: https://dev.omeka.org/omeka-s-sandbox/index.php
Curious why does it have that directive if index.php doesn’t work?
I was able to get the desired result by changing that particular rewrite and eliminating index.php ie:
RewriteRule ^(.*)$ %{ENV:BASE}/ [E=OMEKA_REQ:"1",L]
BUT, would doing that be problematic for the rest of the site? I didn’t see any problems, but wanted to double check on that.
Thanks,
Joseph Anderson