🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.www.server-side
3 messages
3 total messages Started by RM Thu, 19 Dec 2019 05:31
redirect bez redirecta
#61527
Author: RM
Date: Thu, 19 Dec 2019 05:31
83 lines
4179 bytes
Próbuję uruchomić pewną aplikację PHP (ściągniętą z Internetu), 
umieszczoną w katalogu /var/www/html.
Z nieznanego mi powodu przy otwieraniu w przeglądarce http://localhost 
uruchamia mi się skrypt /var/www/html/install/index.php zamiast 
/var/www/index.php (chciałbym, żeby mi się ten uruchamiał).
Aplikacja zawiera plik /var/www/html/.htaccess o następującej treści 
(nie widzę tu żadnego redirecta do install/index.php):

RewriteEngine on

RewriteRule ^logowanie/?$ index.php?akcja=logowanie [NC,QSA,L]
RewriteRule ^rejestracja/?$ index.php?akcja=rejestracja [NC,QSA,L]
RewriteRule ^reset_hasla/?$ index.php?akcja=reset_hasla [NC,QSA,L]
RewriteRule ^kategoria,([0-9]+),(.*)/?$ index.php?akcja=kategoria&id=$1 
[NC,QSA,L]
RewriteRule ^([0-9]+),(.*)/?$ 
index.php?akcja=ogloszenie&id=$1&prosty_tytul=$2 [NC,QSA,L]
RewriteRule ^dodaj/?$ index.php?akcja=dodaj [NC,QSA,L]
RewriteRule ^dodaj,([0-9]+)/?$ index.php?akcja=dodaj&id=$1 [NC,QSA,L]
RewriteRule ^edytuj,([0-9]+),(.*)/?$ 
index.php?akcja=edytuj&id=$1&prosty_tytul=$2 [NC,QSA,L]
RewriteRule ^moje_ogloszenia/?$ index.php?akcja=moje_ogloszenia [NC,QSA,L]
RewriteRule ^schowek/?$ index.php?akcja=schowek [NC,QSA,L]
RewriteRule ^o_mnie/?$ index.php?akcja=o_mnie [NC,QSA,L]
RewriteRule ^ustawienia/?$ index.php?akcja=ustawienia [NC,QSA,L]
RewriteRule ^regulamin/?$ index.php?akcja=info&id=regulamin [NC,QSA,L]
RewriteRule ^polityka_prywatnosci/?$ 
index.php?akcja=info&id=polityka_prywatnosci [NC,QSA,L]
RewriteRule ^pomoc/?$ index.php?akcja=info&id=pomoc [NC,QSA,L]
RewriteRule ^onas/?$ index.php?akcja=info&id=onas [NC,QSA,L]
RewriteRule ^platnosci/?$ index.php?akcja=info&id=platnosci [NC,QSA,L]
RewriteRule ^program_partnerski/?$ 
index.php?akcja=info&id=program_partnerski [NC,QSA,L]
RewriteRule ^kontakt/?$ index.php?akcja=kontakt [NC,QSA,L]
RewriteRule ^profil,(.*)/?$ index.php?akcja=profil&login=$1 [NC,QSA,L]
RewriteRule ^aktualnosci/?$ index.php?akcja=aktualnosci [NC,QSA,L]
RewriteRule ^aktualnosc,([0-9]+),(.*)/?$ 
index.php?akcja=aktualnosc&id=$1&prosty_tytul=$2 [NC,QSA,L]
RewriteRule ^moj_program_partnerski/?$ 
index.php?akcja=moj_program_partnerski [NC,QSA,L]
RewriteRule ^404/?$ index.php?akcja=404 [NC,QSA,L]

RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]

ErrorDocument 404 /index.php?akcja=404

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# HTML
ExpiresByType text/html "access plus 2 days"
</IfModule>
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Javascript
ExpiresByType application/javascript "access plus 1 month"
</IfModule>
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# CSS
ExpiresByType text/css "access plus 1 month"
</IfModule>
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
</IfModule>
<IfModule mod_headers.c>
# Set XSS Protection header
Header set X-XSS-Protection "1; mode=block"
</IfModule>
Re: redirect bez redirecta
#61528
Author: RM
Date: Thu, 19 Dec 2019 09:36
1 lines
903 bytes
W rewrite logu nic nie ma.
Re: redirect bez redirecta
#61529
Author: RM
Date: Mon, 23 Dec 2019 05:28
1 lines
920 bytes
Znalazłem ukryte header Location /install.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads