I would like to redirect any trafic which tries to acces com_users (any view) or the frontpage editing (index.php?option=com_content&view=form&layout=edit)
to the frontpage.
I don't want to use any extensions for this, so I'm looking for a solution with .htaccess and web.config
I'm not so familiar with rewrite conditions so I'm sure I doing it the wrong way. But couldn't figure out the right.
For example I tried this for web.config:
<rule name="Joomla! Rule 3, Deny com_users and editing">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAny">
<add input="{QUERY_STRING}" pattern="/?option=com_users" />
<add input="{QUERY_STRING}" pattern="layout=edit" />
<add input="{REQUEST_FILENAME}" pattern="index.php" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
end this for .htaccess:
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} com_users #added this to the original Joomla! code
RewriteCond %{REQUEST_URI} edit #added this to the original Joomla! code
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#