gpt4 book ai didi

apache - 为什么我可以查看页面源但页面加载为空白?

转载 作者:行者123 更新时间:2023-12-04 06:14:15 24 4
gpt4 key购买 nike

我的重写规则是:

RewriteRule   ^m/watch/([0-9]+)$   /m/watch.php?v=$1   [NC,L]

当我尝试去 http://www.example.com/m/watch/555该页面被加载为空白,但是当我单击查看源代码时,我的所有代码都在那里。为什么会发生这种情况?

如果我尝试跳过规则并转到 http://www.example.com/m/watch.php?v=555页面加载正常。

.htaccess 文件
# block access to ini
<Files ~ "\.ini$">
Order allow,deny
Deny from all
</Files>

ErrorDocument 404 /not_found.php

Options +FollowSymlinks
RewriteEngine on

#redirect to www
RewriteCond %{HTTP_HOST} ^brocktv.ca$
RewriteRule ^(.*)$ "http\:\/\/www\.brocktv\.ca\/$1" [R=301,L]

RewriteRule ^team$ team.php [NC,L]
RewriteRule ^team/$ team.php [NC,L]

RewriteRule ^involved$ involved.php [NC,L]
RewriteRule ^involved/$ involved.php [NC,L]

RewriteRule ^home$ home.php [NC,L]
RewriteRule ^home/$ home.php [NC,L]


RewriteRule ^m/watch/([0-9]+)$ /m/watch.php?v=$1 [NC,L]
RewriteRule ^m/watch/([0-9]+)/$ /m/watch.php?v=$1 [NC,L]

RewriteRule ^watch/([0-9]+)$ watch.php?v=$1 [NC,L]
RewriteRule ^watch/([0-9]+)/$ watch.php?v=$1 [NC,L]

RewriteRule ^isff$ ISFF.php [NC,L]
RewriteRule ^isff/$ ISFF.php [NC,L]

RewriteRule ^renderthis$ renderthis.php [NC,L]
RewriteRule ^renderthis/$ renderthis.php [NC,L]

RewriteRule ^oweek$ oweek.php [NC,L]
RewriteRule ^oweek/$ oweek.php [NC,L]

RewriteRule ^new$ new.php [NC,L]
RewriteRule ^new/$ new.php [NC,L]

RewriteRule ^m/shows$ /m/shows.php [NC,L]
RewriteRule ^m/shows/$ /m/shows.php [NC,L]

RewriteRule ^m/categories$ /m/categories.php [NC,L]
RewriteRule ^m/categories/$ /m/categories.php [NC,L]

RewriteRule ^m/social$ /m/social.php [NC,L]
RewriteRule ^m/social/$ /m/social.php [NC,L]

RewriteRule ^m/contests$ /m/contests.php [NC,L]
RewriteRule ^m/contests/$ /m/contests.php [NC,L]

# temporary redirect for jobs
RewriteRule ^jobs$ http://www.busu.net/get-involved/jobs [R,NC,L]
RewriteRule ^jobs/$ http://www.busu.net/get-involved/jobs [R,NC,L]

# 480 weeks
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=290304000, public"
</FilesMatch>

# compress the files
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
# removes some bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

Options -Indexes FollowSymLinks

RewriteCond %{HTTP_HOST} ^brocktv.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www.brocktv.ca$
RewriteRule ^elections\/?$ "http\:\/\/www\.brocktv\.ca\/elections\.php" [R=302,L]

RewriteCond %{HTTP_HOST} ^brocktv.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www.brocktv.ca$
RewriteRule ^isff$ "http\:\/\/www\.brocktv\.ca\/ISFF\.php" [R=301,L]

最佳答案

当我访问网站/m/watch/1 时,我得到:

"NetworkError: 404 Not Found - http://www.brocktv.ca/m/watch/css/style.css?v=0.02"style.css?v=0.02
"NetworkError: 404 Not Found - http://www.brocktv.ca/m/watch/js/libs/modernizr-custom.js"modern...stom.js
"NetworkError: 404 Not Found - http://www.brocktv.ca/m/watch/js/mylibs/helper.js"helper.js
"NetworkError: 404 Not Found - http://www.brocktv.ca/m/watch/js/libs/modernizr-custom.js"modern...stom.js
"NetworkError: 404 Not Found - http://www.brocktv.ca/m/watch/js/mylibs/helper.js"helper.js
GET http://www.brocktv.ca/mediaplayer/jwplayer.js?_=1316396612274
MBP is not defined
[Break On This Error] MBP.scaleFix();
1 (line 81)
GET http://www.brocktv.ca/m/watch/js/mylibs/helper.js?_=1316396612766

404 Not Found 148ms
"NetworkError: 404 Not Found - http://www.brocktv.ca/m/watch/js/mylibs/helper.js?_=1316396612766"helper...6612766
MBP is not defined
[Break On This Error] yepnope({test: Modernizr.mq("(min-..., nope: ["js/libs/respond.min.js"]});

另外,当我删除 class=class="no-js" 时我看到了一些东西。我认为您重写了与 CSS 或 JS 文件冲突的规则,从而导致站点被“隐藏”

例如包含的 css 文件是: css/style.css?v=0.02 ,也许应该是: /css/style.css?v=0.02

关于apache - 为什么我可以查看页面源但页面加载为空白?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7465596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com