apache - TYPO3 breaks urls without WWW -
the problem when want access website www.example.com/my/subpage works great when seek access website (without www) example.com/my/subpage typo3 breaks downwards , redirect www.example.com/index.php/subpage.
the redirect non www www right why destroy url? here .htaccess redirect:
rewritecond %{http_host} !^www\.example\.com$ rewriterule ^(.*)$ http://www.example.com/$1 [l,r=301] for "nice" urls utilize realurl extension. ideas?
edit (more htaccess):
rewriterule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [l] rewriterule ^typo3$ - [l] rewriterule ^typo3/.*$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_filename} !-l rewriterule .* index.php
keep 301 rules before other internal rewrite rules:
rewriteengine on rewritecond %{http_host} !^www\.example\.com$ rewriterule ^ http://www.example.com%{request_uri} [l,r=301,ne] rewriterule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [l] rewriterule ^typo3(/.*)?$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_filename} !-l rewriterule ^ index.php [l] also test in new browser avoid browser caching issues.
apache .htaccess mod-rewrite typo3 realurl
No comments:
Post a Comment