Domanda Risolto htaccess problema URL

Stato
Discussione chiusa ad ulteriori risposte.

Warez

Utente Electrum
5 Novembre 2011
170
63
24
178
Codice:
Options All -Indexes

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?altum=$1 [QSA,L]

#SSL
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#www to no-www
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Il problema è il seguente, ogni vola che cerco sul mio sito un url con www o con http viene aggiunto all'URL index.php?altum=

Esempio

https://www.test.com/prova diventa
lo stesso vale per

http://test.com/prova diventa
mentre per


tutto resta normale
 
@junkercoder ho risolto il problema della sostituzione URL, bastava cambiare l'ordine in questo modo
Codice:
Options All -Indexes

#www to no-www
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

#SSL
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?altum=$1 [QSA,L]
 
  • Mi piace
Reazioni: 0xbro
Stato
Discussione chiusa ad ulteriori risposte.