Na een aantal tests op mijn website kwam ik erachter dat mijn htaccess niet werkt zoals ik dat zou willen, ik heb mij al helemaal rot gegoogled maar nergens kom ik dit tegen. Voorbeelden zijn fictief, code echter niet..
Doel:
A. Herschijven van test.nl naar www.test.nl
B. Herschijven van test.nl/nieuws/december naar www.test.nl/nieuws/december
Wat gaat er fout?
A. Dit gaat goed, alles herschrijven van ?id=2 etc.. gaat goed enkel doel B. doet niet wat ik wil.
2. Als ik test.nl/nieuws/december aanspreek verwijst hij hem niet naar de www. variant maar naar de orginele url: www.test.nl/index.php?nieuws=20&maand=12
Hoe los ik dit op?
order allow,deny
allow from all
ExpiresActive On
ExpiresByType image/gif "access plus 1 weeks"
ExpiresByType image/png "access plus 1 weeks"
ExpiresByType image/jpeg "access plus 1 weeks"
ExpiresByType image/x-icon "access plus 1 weeks"
ExpiresByType text/css "access plus 1 weeks"
ExpiresByType text/javascript "access plus 1 weeks"
ExpiresByType application/x-javascript "access plus 1 weeks"
FileETag none
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blaat$ blaat.php [NC,L]
RewriteRule ^blabla/([^/\.]+)/?$ /blabla.php?ID=$1 [NC,L]
AddHandler application/x-httpd-php .php .html .htm
RewriteCond %{HTTP_HOST} ^test\.nl
RewriteRule ^(.*)$ http://www.test.nl%2%{REQUEST_URI} [R=301,L]
Alvast bedankt.