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
  parametr bez parametru htaccess camelrafal 7 5,416 05-10-2012, 14:24
Ostatni post: camelrafal
  Przekierowanie 301 .htaccess dla całej domeny a dla podstron? hdckredyty 2 3,579 04-10-2012, 00:47
Ostatni post: hdckredyty
  .htaccess xtronix856 17 14,485 21-09-2012, 02:05
Ostatni post: xtronix856
  .htaccess ukrywanie parametrów camelrafal 0 1,933 20-09-2012, 17:12
Ostatni post: camelrafal
  Zmiana linków .htaccess ? Stefan_113 0 1,899 29-08-2012, 16:42
Ostatni post: Stefan_113

Skocz do:


Użytkownicy przeglądający ten wątek:
Sponsorzy i przyjaciele
SeoHost.pl