I would like to redirect registration page to homepage by using .htaccess
now my code is redirecting to /component/users/?view=login&Itemid=437
which is login page. I would like to make registration and front-end login page not accessible for users.
So the target is to redirect /component/users/?view=login&Itemid=437
and /index.php?option=com_users&view=registration&Itemid=999
to "403 error page"
# RewriteBase /
# Disable calls to user registration ("register", this url ends with: view=registration))
# Send all blocked request to homepage, use Flag [F] for 403 Forbidden error!
RewriteCond %{QUERY_STRING} (view=registration) [NC]
RewriteRule .* index.php [F]
## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# 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
# 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]
#
## End - Joomla! core SEF Section.
www.mypage.com/component/users/?view=login&Itemid=437
but public users can access it anyway by inputting this link to their web browser.http://www.moghees.co.uk/index.php?option=com_users&view=registration&Itemid=999
orhttp://noblebrand.pl/index.php?option=com_users&view=registration&Itemid=999
/index.php?option=com_users&view=registration&Itemid=999
to domain you will be on registration page or it will redirect to login page. But some websites likehttps://www.linux.com/
orhttps://www.guggenheim.org/
restricted access. So it drops an error or redirecting to another page.