Note that there are some explanatory texts on larger screens.

plurals
  1. POcombining force-www with clean urls
    primarykey
    data
    text
    <p>I have this mod-rewrite in my htacces which enables some clean urls;</p> <pre><code>&lt;IfModule mod_rewrite.c&gt; RewriteEngine on RewriteBase / ### LANGUAGE REDIRECT RULES start RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(en|nl)-?()?\/(.*\/?)$ index.php?language=$1&amp;region=$2&amp;symphony-page=$3&amp;%{QUERY_STRING} [L] ### LANGUAGE REDIRECT RULES end ### FRONTEND REWRITE - Will ignore files and folders RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*\/?)$ ./index.php?symphony-page=$1&amp;%{QUERY_STRING} [L] &lt;/IfModule&gt; </code></pre> <p>Now I would like to also force www, so I extended the code:</p> <pre><code>&lt;IfModule mod_rewrite.c&gt; RewriteEngine on RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] RewriteBase / ### LANGUAGE REDIRECT RULES start RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(en|nl)-?()?\/(.*\/?)$ index.php?language=$1&amp;region=$2&amp;symphony-page=$3&amp;%{QUERY_STRING} [L] ### LANGUAGE REDIRECT RULES end ### FRONTEND REWRITE - Will ignore files and folders RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*\/?)$ ./index.php?symphony-page=$1&amp;%{QUERY_STRING} [L] &lt;/IfModule&gt; </code></pre> <p>However this results in none of my pages being found. FYI A language redirect adds country-code parameters to the url on load.</p> <p>How do I get these rules to play along?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload