Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Wymuszenie http w htaccess - kto potrafi?
#1
Witam ponownie Smile
To juz bedzie drugi post - niedlugo chyba zaczne sie interesowac html Smile

Otoz nastepnym problemem ktory mam jest wymuszenie http w htaccess na wszystkich podstronach na mojej stronie.
Aktualnie zawartosc mojego htaccess jest nastepujaca:
Cytat:RewriteEngine On

RewriteRule ^login.html$ index.php?cmd=login [L]
RewriteRule ^logout.html$ index.php?cmd=login&logout=yes [L]
RewriteRule ^register.html$ index.php?cmd=register [L]
RewriteRule ^add_new.html$ index.php?cmd=add_new [L]
RewriteRule ^edit_profile.html$ index.php?cmd=edit_profile [L]
RewriteRule ^my_notice.html$ index.php?cmd=my_notice [QSA]
RewriteRule ^contact.html$ index.php?cmd=contact [L]
RewriteRule ^search.html$ index.php?cmd=search [QSA]
RewriteRule ^lostpassword.html$ index.php?cmd=lostpassword [QSA]
RewriteRule ^premium.html$ index.php?cmd=premium [QSA]
RewriteRule ^schowek.html$ index.php?cmd=schowek [QSA]
RewriteRule ^news.html$ index.php?cmd=news [QSA]
RewriteRule ^activ_acount,(.*).html$ index.php?cmd=activ_acount&code=$1 [L]
RewriteRule ^print_([0-9]+).html$ templates/print.php?id=$1 [L]
RewriteRule ^(.+)/([0-9]+)$ index.php?cmd=pages&id=$2&title=$1 [L]
RewriteRule ^(.+)_([0-9]+).html$ index.php?cmd=view_notice&name=$2 [QSA]
RewriteRule ^_(.+)/(.+)/(.+)/(.+)/$ index.php?cmd=view&name1=$1&name2=$2&name3=$3&name4=$4 [QSA]
RewriteRule ^_(.+)/(.+)/(.+)/$ index.php?cmd=view&name1=$1&name2=$2&name3=$3 [QSA]
RewriteRule ^_(.+)/(.+)/$ index.php?cmd=view&name1=$1&name2=$2 [QSA]
RewriteRule ^_(.+)/$ index.php?cmd=view_cat&name=$1

Gdzie i jaka regule dodac aby wymusic na wszystkich podstronach/katalogach HTTP a wylaczyc HTTPS

Potrzebuje burzy mozgow panowie Smile Kazda propozycje bede sprawdzal Smile

Odpowiedz
#2
Kod PHP:
RewriteEngine On 
RewriteRule 
^(.*)$ http://www.example.com/$1 [R,L] 

Powinno działać.
Odpowiedz
#3
RewriteEngine On

RewriteRule ^(.*)$ http://www.mojastrona.com/$1 [R,L]
RewriteRule ^login.html$ index.php?cmd=login [L]
RewriteRule ^logout.html$ index.php?cmd=login&logout=yes [L]
RewriteRule ^register.html$ index.php?cmd=register [L]
RewriteRule ^add_new.html$ index.php?cmd=add_new [L]
RewriteRule ^edit_profile.html$ index.php?cmd=edit_profile [L]
RewriteRule ^my_notice.html$ index.php?cmd=my_notice [QSA]
RewriteRule ^contact.html$ index.php?cmd=contact [L]
RewriteRule ^search.html$ index.php?cmd=search [QSA]
RewriteRule ^lostpassword.html$ index.php?cmd=lostpassword [QSA]
RewriteRule ^premium.html$ index.php?cmd=premium [QSA]
RewriteRule ^schowek.html$ index.php?cmd=schowek [QSA]
RewriteRule ^news.html$ index.php?cmd=news [QSA]
RewriteRule ^activ_acount,(.*).html$ index.php?cmd=activ_acount&code=$1 [L]
RewriteRule ^print_([0-9]+).html$ templates/print.php?id=$1 [L]
RewriteRule ^(.+)/([0-9]+)$ index.php?cmd=pages&id=$2&title=$1 [L]
RewriteRule ^(.+)_([0-9]+).html$ index.php?cmd=view_notice&name=$2 [QSA]
RewriteRule ^_(.+)/(.+)/(.+)/(.+)/$ index.php?cmd=view&name1=$1&name2=$2&name3=$3&name4=$4 [QSA]
RewriteRule ^_(.+)/(.+)/(.+)/$ index.php?cmd=view&name1=$1&name2=$2&name3=$3 [QSA]
RewriteRule ^_(.+)/(.+)/$ index.php?cmd=view&name1=$1&name2=$2 [QSA]
RewriteRule ^_(.+)/$ index.php?cmd=view_cat&name=$1

NiESTETY NIE TRYBIT
Probowalem $1.php rowniaz
Odpowiedz


Podobne wątki
Wątek: Autor Odpowiedzi: Wyświetleń: Ostatni post
  http://topcbdoilhub.com/bionatrol-cbd-oil/ Christerton 0 82 15-07-2019, 16:28
Ostatni post: Christerton
  http://testrot3online.info/blog/fitness/rapid-tone-diet/ Alstenire 0 52 02-07-2019, 15:09
Ostatni post: Alstenire
  http://obesity2.com/blog/weight-loss/max-fit-keto/ MaKetxv 0 80 24-06-2019, 14:35
Ostatni post: MaKetxv
  http://obesity2.com/blog/weight-loss/pure-life-keto/ PurLifKetvx 0 76 10-06-2019, 15:28
Ostatni post: PurLifKetvx
  http://obesity2.com/blog/weight-loss/pure-life-keto/ PurLifKetb 0 59 09-06-2019, 15:42
Ostatni post: PurLifKetb

Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości
Sponsorzy i przyjaciele
Tworzenie sklepów