Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne]Mod rewrite http://www na https://www, htaccess
Malinaa
post
Post #1





Grupa: Zarejestrowani
Postów: 573
Pomógł: 6
Dołączył: 21.07.2008

Ostrzeżenie: (0%)
-----


Jak dodać przekierowanie w .htaccess (Symfony)
ze starego adresu strony: http:/www.domena.pl/folder/
na adres: https://www.domena.pl/folder


Obecnie w pliku jest tak:

Kod
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
    RewriteRule .* - [E=BASE:%1]

    RewriteCond %{HTTP:Authorization} .+
    RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]

    RewriteCond %{ENV:REDIRECT_STATUS} =""
    RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ %{ENV:BASE}/index.php [L]

</IfModule>

<IfModule !mod_rewrite.c>
    <IfModule mod_alias.c>
        RedirectMatch 307 ^/$ /index.php/
    </IfModule>
</IfModule>


i kiedy klikam w Google na dowolny / każdy stary link zawsze przekierowuje na adres główny https://www.domena.pl
a chcę, aby przekierowywało z:
http:/www.domena.pl/folder/ na https:/www.domena.pl/folder
http:/www.domena.pl/folder/name.html na https:/www.domena.pl/folder/name.html
itd.


Ten post edytował Malinaa 29.09.2021, 23:07:39
Go to the top of the page
+Quote Post

Posty w temacie
- Malinaa   [inne]Mod rewrite http://www na https://www   29.09.2021, 22:47:10
- - vokiel   Przekierowanie z HTTP na HTTPS (z przepisaniem cał...   30.09.2021, 11:14:17
- - Malinaa   Już zrobione.   30.09.2021, 12:35:18


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.09.2025 - 19:21