Hello. This is not strictly a modx question, but I'm hoping you .htaccess guru's out there can help.
I have a project where the content in the modx implementation needs to be restricted based on host (i.e. domain) name. Toward that end, I installed a vanilla copy of modx (2.2.10) for testing in a subdirectory called mdx, and created a .htaccess file in mdx that contains:
<IfModule mod_authz_host.c>
Order Deny,Allow
Deny from all
Allow from stuff2help.info
</IfModule>
At the root of stuff2help.info I put an index.html file that contains the following:
<div style="margin-left:auto; margin-right:auto; width:200px;">
<iframe src="
http://stuff2help.info/mdx/index.php" height="800" width="95%" seamless="" frameborder="0"></iframe>
</div>
With the .htaccess file in place containing the above code I get an error:
Forbidden
You don't have permission to access /mdx/index.php on this server.
If I remove the .htaccess file from stuff2help.info/mdx then I correctly see the content of the modx home page that is installed in mdx.
Can anyone help? I'm pretty sure I don't really understand what mod_authz_host is doing, but I haven't been able to find an explanation that help me resolve the problem.
Follow up question: is there a module/package that allows you to restrict access to a list of domain names?
TIA, Rick.
[ed. note: ride2719 last edited this post 12 years, 10 months ago.]