3

I'm using Liferay 6.2 EE that runs on tomcat but it's fronted by an Apache server. I want to redirect users so that whenever they hit the old liferay URL, it redirects them to the new liferay URL. I changed the URL in liferay, so it is now the new URL. However, whenever I try to go to the old URL, I get a page request error. It never redirects me to the new URL. In /san/apache/conf/ I put my redirect code inside of httpd.conf. This my code:

RewriteEngine On
RewriteRule ^group/old/(.*) /group/new/$1 [L]

After I applied these changes, I restarted the Apache server and it still doesn't work. I've tried a bunch of other combinations as well. Does anyone know what I'm doing wrong? Is there some place else I have to make this change?

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
Samantha
  • 91
  • 9

1 Answers1

2

Ah, since your rewrite rule is lying in the server config file (instead of htaccess file), the mod-rewrite receives URLs with the leading slashes (/). So, the rule should be:

RewriteEngine On
RewriteRule ^/group/old/(.*) /group/new/$1 [L]
hjpotter92
  • 78,589
  • 36
  • 144
  • 183