Add the following code fragments in your .htaccess file for LifeRay URL redirection.

To redirect the root folder from http://mydomain.com:8080 to http://mydomain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^/?$ "http\:\/\/mydomain\.com\:8080%{REQUEST_URI}" [P,QSA,L]

To redirect a sub-folder from http://mydomain.com:8080/myfolder/ to http://mydomain.com/myfolder/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^
mydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^myfolder "http\:\/\/mydomain\.com\:8080%{REQUEST_URI}" [P,QSA,L]


NOTE: Replace mydomain.com & myfolder with the correct values. You must add additional code fragments for each new sub-folder.
Was this answer helpful? 0 Users Found This Useful (2 Votes)