For example, i need the result of this url:
https://mywebsite.com/reviews/name
to appear like this:
https://reviews.mywebsite.com/name
The content of https://mywebsite.com/reviews/name is generated by LISE and works as expected using the default .htaccess provided by cmsms.
Code: Select all
<IfModule rewrite_module>
Thanks in advance.
RewriteEngine on
# If your CMSMS installation is in a subdirectory of your domain, you need to specify the relative path (from the root of the domain) here.
# In example: RewriteBase /[subdirectory name]
RewriteBase /
# +++++ ADD THIS - START +++++
# Link to http(s)://www.website.com then redirect to https://website.com
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# Force URLs have https instead of http
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# ++++++ ADD THIS - END +++++
# Rewrites URLs in the form of /parent/child/grandchild but only rewrites if the requested URL is not a file or directory.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>