Hej,
har en hemsida online med konfigurationen att tvinga allting in i en index.php som sedan skickar vidare requesten till en controller som servar rätt sub-sida.
Ubuntu:14.04 och apache2. Backend är PHP
Har följande i en .htaccess vilket fungerar utan problem;
Citat:
Hemsida.se/.htaccess
AcceptPathInfo On
Options +MultiViews
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)$ /index.php?path=$1 [NC,L,QSA]
Men när jag sätter upp följande reglerer med 'let's encrypt' för att få till det gröna hänglåset;
Citat:
Hemsida.se.conf
<VirtualHost *:80>
ServerName hemsida.se
ServerAdmin webmaster@hemsida.se
ServerAlias hemsida.se
DocumentRoot /var/www/html/basic
ErrorLog /var/www/html/error.log
CustomLog /var/www/html/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =hemsida.se [OR]
##RewriteCond %{SERVER_NAME} =w [OR]
RewriteCond %{SERVER_NAME} =www.hemsida.se
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
..fungerar det inte utan istället för att gå till 'index.php?path=
subsida', så försöker den nå '
subsida' direkt.
Hur skriver jag till reglerna så att det kombineras?