Article View: pl.comp.www.server-side
Article #61533Re: 302 Found error
From: PawelS pawel(at)wbcd(dot)pl
Date: Mon, 22 Jun 2020 17:35
Date: Mon, 22 Jun 2020 17:35
48 lines
2612 bytes
2612 bytes
RM pisze:
> Przy wchodzeniu na moją stronę bez prefiksu www mam taki komunikat:
>
> Found
> The document has moved here.
> Additionally, a 302 Found error was encountered while trying to use an
> ErrorDocument to handle the request.
>
> Nie rozumiem dlaczego bo nie używam [R] w .htaccess:
>
> #v+
> SetEnv CI_ENV testing
> DirectoryIndex index.php
> ErrorDocument 401
> "/home/users/rmagdziarz2018/public_html/praca/denial.html"
>
> RewriteEngine on
> RewriteBase /
>
> RewriteCond %{HTTP_HOST} !^www\.
> RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1
>
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond $1
> !^(index\.php|robots\.txt|denial\.html|resources|captcha|attachments)
> RewriteRule ^(.*)$ index.php/$1 [L]
>
> php_value upload_max_filesize 75M
> php_value post_max_size 100M
> #v-
>
> Proszę o wytłumaczenie.
A w PHP nie masz jakieś wywołania header("Location: ...") ?
chociaż to byłoby bez sensu, gdyby apache interpretował
nagłówki wygenerowane przez moduł generujący dynamiczną treść.
> The document has moved here.
> Additionally, a 302 Found error was encountered while trying to use an
> ErrorDocument to handle the request.
Co prawda to będzie trochę dziwne, ale zgaduję,
ze być może brakuje analogicznej do poniższej wspisu:
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
czyli na wzór powyższego przykładu powinieneś dodać
poniższą konfigurację (oraz upewnić się, że ten plik jest dostępny):
ErrorDocument 302 /error/HTTP_FOUND.html.var
Technical Details
Message-ID:
<5ef0ebd5$0$17365$65785112@news.neostrada.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!goblin2!goblin.stu.neva.ru!aioe.org!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mailReferences:
<rcqo3v$32lvt$1@portraits.wsisiz.edu.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!goblin2!goblin.stu.neva.ru!aioe.org!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail Date: Mon, 22 Jun 2020 19:35:15 +0200 From: "PawelS pawel(at)wbcd(dot)pl" <fake@email.org> User-Agent: Thunderbird 2.0.0.18 (X11/20081120) MIME-Version: 1.0 Newsgroups: pl.comp.www.server-side Subject: Re: 302 Found error References: <rcqo3v$32lvt$1@portraits.wsisiz.edu.pl> In-Reply-To: <rcqo3v$32lvt$1@portraits.wsisiz.edu.pl> Lines: 48 Message-ID: <5ef0ebd5$0$17365$65785112@news.neostrada.pl> Organization: Telekomunikacja Polska NNTP-Posting-Host: 89.231.96.70 X-Trace: 1592847317 unt-rea-a-01.news.neostrada.pl 17365 89.231.96.70:41798 X-Complaints-To: abuse@news.neostrada.pl X-Received-Bytes: 2417 X-Received-Body-CRC: 4136601458 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit