Redirecting to www loses URL path - Joomla! Forum - community, help and support


http://mywebsite.com/path

leads

http://www.mywebsite.com (no /path)

here's .htaccess configuration -

code: select all

## begin - joomla! core sef section.
#
rewriterule .* - [e=http_authorization:%{http:authorization}]
#
# if requested path , file not /index.php , request
# has not been internally rewritten index.php script
rewritecond %{request_uri} !^/index\.php
# , requested path , file doesn't directly match physical file
rewritecond %{request_filename} !-f
# , requested path , file doesn't directly match physical folder
rewritecond %{request_filename} !-d
# internally rewrite request index.php script
rewriterule .* index.php [l]
#
## end - joomla! core sef section.

# begin redirect www
rewriteengine on
rewritecond %{http_host} ^mywebsite.co.il [nc]
rewriterule ^(.*)$ https://www.mywebsite.co.il/$1 [l,r=301]
# end redirect www


i thouhgt might joomla! core sef section, when remove it, website doesn't work well.

try this:

code: select all

rewritecond %{http_host} !^www\. [nc]
rewriterule ^(.*)$ https://www.%{http_host}/$1 [r=301,l]





Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support