This is a Joomla site. Apparently the .htaccess file that comes with Joomla can override any rewrite rules you place in the vhost.
Apache rewrite rule is not taking effect after restart
-
05-07-2023 - |
题
I have these in my Apache vhost
RewriteEngine on
RewriteCond %{QUERY_STRING} ^highlight=WyJwb3J0YWwiLCJub3RpY2VzIiwicG9ydGFsIG5vdGljZXMiXQ==(&.*)?$ [NC]
RewriteRule ^component/k2/item/473-careers-portal-notices\.html$ /career-portal-notices.html?%1 [R=301,NE,NC,L]
However, when I hit site.com/component/k2/item/473-careers-portal-notices.html?highlight=WyJwb3J0YWwiLCJub3RpY2VzIiwicG9ydGFsIG5vdGljZXMiXQ==
I do not get redirected to /carerr-portal-notices.html
.
What do I need to change to make this redirection happen? And I've restarted Apache already.
解决方案
不隶属于 StackOverflow