Mögliches .HTACCESS-Problem
588
Denoteone
Ich führe ein Youtube-Klon-Skript auf einer lokalen Installation von XAMPP über einen Windows 7-Computer aus. Nach der Installation kann ich die Startseite sehen. Wenn ich jedoch über einen Link oder eine direkte URL zu einer anderen Seite navigiere, erhalte ich einen Fehler "Objekt nicht gefunden" 404. Ich habe das Gefühl, dass dies etwas mit meiner .htaccess-Datei zu tun hat, aber nicht zu 100%.
Meine Website wird über dev.mywebsite.com auf einem virtuellen Host eingerichtet und verweist auf einen Ordner auf meinem lokalen Computer.
Nachfolgend habe ich den Inhalt der aktuellen .htaccess-Datei eingefügt.
# deny directory listing, enable symbolic links Options -Indexes +FollowSymlinks AddType video/mp4 .mp4 AddType video/webm .webm AddType video/ogg .ogv AddType image/jpeg .jpeg AddType image/jpeg .jpg AddType image/png .png AddType image/gif .gif AddType audio/mpeg .mp3 AddType application/pdf .pdf <Files *> allow from 173.0.80.0/24 ##PayPal allow from 173.0.81.0/24 ##PayPal allow from 173.0.82.0/24 ##PayPal allow from 173.0.83.0/24 ##PayPal allow from all </Files> # protect .htaccess <Files .htaccess> deny from all </Files> # protect script files, template file, log files <Files ~ "^(.*)\.(inc|inc\.php|s?p?html|cgi|pl|py|asp|aspx|sh|cin|tpl|tplb|log)$"> Order allow,deny Deny from all </Files> <FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|woff|webp)$"> Header set Cache-Control "max-age=84600, public" </FilesMatch> <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and fonts AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml # Remove browser bugs (only needed for really old browsers) 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 </IfModule> ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 week" ExpiresByType image/jpeg "access 1 week" ExpiresByType image/gif "access 1 week" ExpiresByType image/png "access 1 week" ExpiresByType text/css "access 1 week" ExpiresByType text/html "access 1 week" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 week" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 month" ExpiresDefault "access 1 month" </IfModule> ## EXPIRES CACHING ## <IfModule mod_headers.c> Header set Connection keep-alive <filesmatch "\.(ico|flv|gif|swf|eot|woff|otf|ttf|svg)$"> Header set Cache-Control "max-age=604800, public" </filesmatch> <filesmatch "\.(jpg|jpeg|png)$"> Header set Cache-Control "max-age=604800, public" </filesmatch> # css and js should use private for proxy caching https://developers.google.com/speed/docs/best-practices/caching#LeverageProxyCaching <filesmatch "\.(css|js)$"> Header set Cache-Control "max-age=604800, private" </filesmatch> #<filesMatch "\.(x?html?|php)$"> # Header set Cache-Control "max-age=600, private, must-revalidate" #</filesMatch> </IfModule> # begin rewrite rules RewriteEngine On # redirect to www # RewriteCond % ^your-domain.com [NC] # RewriteRule ^(.*)$ http://www.your-domain.com/$1 [L,R=301] ## uncomment for SEO urls RewriteRule ^([viadb])/([^/]*)/([^/]*)&p=([^/]*)$ f_modules/m_frontend/m_file/view.php?$1=$2&p=$4&g=1 [L] RewriteRule ^([viadb])/([^/]*)/([^/]*)$ f_modules/m_frontend/m_file/view.php?$1=$2&g=1 [L] RewriteRule ^videos/([^/]*)$ f_modules/m_frontend/m_file/browse.php?t=video&c=$1 [L] RewriteRule ^pictures/([^/]*)$ f_modules/m_frontend/m_file/browse.php?t=image&c=$1 [L] RewriteRule ^music/([^/]*)$ f_modules/m_frontend/m_file/browse.php?t=audio&c=$1 [L] RewriteRule ^documents/([^/]*)$ f_modules/m_frontend/m_file/browse.php?t=document&c=$1 [L] RewriteRule ^blogs/([^/]*)$ f_modules/m_frontend/m_file/browse.php?t=blog&c=$1 [L] RewriteRule ^channels/([^/]*)$ f_modules/m_frontend/m_acct/channels.php?t=channel&c=$1 [L] # image hotlinking protection # RewriteCond % !^$ # RewriteCond % !^http://(www\.)?yourdomain.com/.*$ [NC] # RewriteRule \.(jpg|jpeg|png|gif|bmp)$ - [F] # passing all requests through parser.php RewriteCond % !-f RewriteCond % !-d RewriteRule .* parser.php [L,QSA] # begin block SetEnvIfNoCase User-Agent "Abonti|aggregator|AhrefsBot|asterias|BDCbot|BLEXBot|BuiltBotTough|Bullseye|BunnySlippers|ca\-crawler|CCBot|Cegbfeieh|CheeseBot|CherryPicker|CopyRightCheck|cosmos|Crescent|discobot|DittoSpyder|DotBot|Download Ninja|EasouSpider|EmailCollector|EmailSiphon|EmailWolf|EroCrawler|Exabot|ExtractorPro|Fasterfox|FeedBooster|Foobot|Genieo|grub\-client|Harvest|hloader|httplib|HTTrack|humanlinks|ieautodiscovery|InfoNaviRobot|IstellaBot|Java/1\.|JennyBot|k2spider|Kenjin Spider|Keyword Density/0\.9|larbin|LexiBot|libWeb|libwww|LinkextractorPro|linko|LinkScan/8\.1a Unix|LinkWalker|LNSpiderguy|lwp\-trivial|magpie|Mata Hari|MaxPointCrawler|MegaIndex|Microsoft URL Control|MIIxpc|Mippin|Missigua Locator|Mister PiX|MJ12bot|moget|MSIECrawler|NetAnts|NICErsPRO|Niki\-Bot|NPBot|Nutch|Offline Explorer|Openfind|panscient\.com|PHP/5\.\{|ProPowerBot/2\.14|ProWebWalker|Python\-urllib|QueryN Metasearch|RepoMonkey|SemrushBot|SISTRIX|sitecheck\.Internetseer\.com|SiteSnagger|SnapPreviewBot|Sogou|SpankBot|spanner|spbot|Spinn3r|suzuran|Szukacz/1\.4|Teleport|Telesoft|The Intraformant|TheNomad|TightTwatBot|Titan|toCrawl/UrlDispatcher|True_Robot|turingos|TurnitinBot|UbiCrawler|UnisterBot|URLy Warning|VCI|WBSearchBot|Web Downloader/6\.9|Web Image Collector|WebAuto|WebBandit|WebCopier|WebEnhancer|WebmasterWorldForumBot|WebReaper|WebSauger|Website Quester|Webster Pro|WebStripper|WebZip|Wotbox|wsr\-agent|WWW\-Collector\-E|Xenu|Zao|Zeus|ZyBORG|coccoc|Incutio|lmspider|memoryBot|SemrushBot|serf|Unknown|uptime files" bad_bot SetEnvIfNoCase User-Agent "Aboundex|80legs|360Spider|^Java|^Cogentbot|^Alexibot|^asterias|^attach|^BackDoorBot|^BackWeb|Bandit|^BatchFTP|^Bigfoot|^Black.Hole|^BlackWidow|^BlowFish|^BotALot|Buddy|^BuiltBotTough|^Bullseye|^BunnySlippers|^Cegbfeieh|^CheeseBot|^CherryPicker|^ChinaClaw|Collector|Copier|^CopyRightCheck|^cosmos|^Crescent|^Custo|^AIBOT|^DISCo|^DIIbot|^DittoSpyder|^Download\ Demon|^Download\ Devil|^Download\ Wonder|^dragonfly|^Drip|^eCatch|^EasyDL|^ebingbong|^EirGrabber|^EmailCollector|^EmailSiphon|^EmailWolf|^EroCrawler|^Exabot|^Express\ WebPictures|Extractor|^EyeNetIE|^Foobot|^flunky|^FrontPage|^Go-Ahead-Got-It|^gotit|^GrabNet|^Grafula|^Harvest|^hloader|^HMView|^HTTrack|^humanlinks|^IlseBot|^Image\ Stripper|^Image\ Sucker|Indy\ Library|^InfoNaviRobot|^InfoTekies|^Intelliseek|^InterGET|^Internet\ Ninja|^Iria|^Jakarta|^JennyBot|^JetCar|^JOC|^JustView|^Jyxobot|^Kenjin.Spider|^Keyword.Density|^larbin|^LexiBot|^lftp|^libWeb/clsHTTP|^likse|^LinkextractorPro|^LinkScan/8.1a.Unix|^LNSpiderguy|^LinkWalker|^lwp-trivial|^LWP::Simple|^Magnet|^Mag-Net|^MarkWatch|^Mass\ Downloader|^Mata.Hari|^Memo|^Microsoft.URL|^Microsoft\ URL\ Control|^MIDown\ tool|^MIIxpc|^Mirror|^Missigua\ Locator|^Mister\ PiX|^moget|^Mozilla/3.Mozilla/2.01|^Mozilla.*NEWT|^NAMEPROTECT|^Navroad|^NearSite|^NetAnts|^Netcraft|^NetMechanic|^NetSpider|^Net\ Vampire|^NetZIP|^NextGenSearchBot|^NG|^NICErsPRO|^niki-bot|^NimbleCrawler|^Ninja|^NPbot|^Octopus|^Offline\ Explorer|^Offline\ Navigator|^Openfind|^OutfoxBot|^PageGrabber|^Papa\ Foto|^pavuk|^pcBrowser|^PHP\ version\ tracker|^Pockey|^ProPowerBot/2.14|^ProWebWalker|^psbot|^Pump|^QueryN.Metasearch|^RealDownload|Reaper|Recorder|^ReGet|^RepoMonkey|^RMA|Siphon|^SiteSnagger|^SlySearch|^SmartDownload|^Snake|^Snapbot|^Snoopy|^sogou|^SpaceBison|^SpankBot|^spanner|^Sqworm|Stripper|Sucker|^SuperBot|^SuperHTTP|^Surfbot|^suzuran|^Szukacz/1.4|^tAkeOut|^Teleport|^Telesoft|^TurnitinBot/1.5|^The.Intraformant|^TheNomad|^TightTwatBot|^Titan|^True_Robot|^turingos|^TurnitinBot|^URLy.Warning|^Vacuum|^VCI|^VoidEYE|^Web\ Image\ Collector|^Web\ Sucker|^WebAuto|^WebBandit|^Webclipping.com|^WebCopier|^WebEMailExtrac.*|^WebEnhancer|^WebFetch|^WebGo\ IS|^Web.Image.Collector|^WebLeacher|^WebmasterWorldForumBot|^WebReaper|^WebSauger|^Website\ eXtractor|^Website\ Quester|^Webster|^WebStripper|^WebWhacker|^WebZIP|Whacker|^Widow|^WISENutbot|^WWWOFFLE|^WWW-Collector-E|^Xaldon|^Xenu|^Zeus|ZmEu|^Zyborg|Acunetix|FHscan|Baiduspider|Yandex" bad_bot Deny from env=bad_bot
Was bedeutet das Hinzufügen von "AllowOverride All" unmittelbar unter Ihrer ersten Zeile "Options"?
Kinnectus vor 7 Jahren
0
Ich habe das tatsächlich zu meiner virtuellen Hostdatei hinzugefügt, wodurch mein Problem behoben wurde. Ich bin sicher, Ihr Rat hätte auch funktioniert. @Kinnectus Wenn Sie diese Frage damit beantworten wollen, kann ich sie als gelöst markieren.
Denoteone vor 7 Jahren
0
Wenn Sie Ihr eigenes Problem ohne unsere Hilfe beantwortet haben, schreiben Sie Ihre eigene Antwort! :) Es ist alles, um der Community zu helfen.
Kinnectus vor 7 Jahren
1
0 Antworten auf die Frage
Verwandte Probleme
-
4
Gutes freies Ubuntu Server-VMWare-Image benötigt
-
1
Apache Reverse Proxy
-
3
Ubuntu Server mit GNOME Desktop Envinronment - Einstellen der Apatche-Konfigurationsdateiberechtigun...
-
8
Wie kann ich allen Benutzern in Linux Schreibzugriff auf einen Ordner gewähren?
-
5
Gibt es einen * guten * HTML-Modus für Emacs?
-
1
Apache2-Fehlerprotokoll
-
6
Nach dem Starten von Xampp kann nicht auf localhost zugegriffen werden
-
4
Überprüfen, welche PHP-Version ich unter Linux laufe?
-
2
Mac OS X-Bash: Deinstallieren Sie alle Apache- und PHP-Vorfälle
-
1
Installation von PHP5.3 unter Windows Vista x64 mit IIS7