{"id":460,"date":"2018-06-14T12:38:26","date_gmt":"2018-06-14T11:38:26","guid":{"rendered":"http:\/\/hslomka.de\/techno\/?p=460"},"modified":"2018-06-14T12:38:26","modified_gmt":"2018-06-14T11:38:26","slug":"mit-curl-seiten-mit-redirect-aufrufen-folgen","status":"publish","type":"post","link":"https:\/\/techno.slomka.biz\/?p=460","title":{"rendered":"Mit cURL weitergeleiteten Seiten (REDIRECT) folgen"},"content":{"rendered":"<p>Bei cURL Aufrufen landet man oft auf Seiten, die nur einen REDIRECT auf einen andere Seiten ausf\u00fchren.<\/p>\n<p>&lt;<\/p>\n<p>p class=&#8221;kasten&#8221;><br \/>\n  <code>[root@0ccfa08b0829 \/]#  <strong>curl repository\/yum&gt;\/strong&gt;<br \/>\n&lt;!DOCTYPE HTML PUBLIC \"-\/\/IETF\/\/DTD HTML 2.0\/\/EN\"&gt;<br \/>\n&lt;html&gt;&lt;head&gt;<br \/>\n&lt;title&gt;301 Moved Permanently&lt;\/title&gt;<br \/>\n&lt;\/head&gt;&lt;body&gt;<br \/>\n&lt;h1&gt;Moved Permanently&lt;\/h1&gt;<br \/>\n&lt;p&gt;The document has moved &lt;a href=\"http:\/\/repository\/yum\/\"&gt;here&lt;\/a&gt;.&lt;\/p&gt;<br \/>\n&lt;\/body&gt;&lt;\/html&gt;<br \/>\n<\/strong><\/code><\/p>\n<p>So funktioniert es:<\/p>\n<p>&lt;<\/p>\n<p>p class=&#8221;kasten&#8221;><br \/>\n  <code>[root@0ccfa08b0829 \/]#  <strong>curl repository\/yum -L<\/strong><br \/>\n&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 3.2 Final\/\/EN\"&gt;<br \/>\n&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;title&gt;Index of \/yum&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;h1&gt;Index of \/yum&lt;\/h1&gt;<br \/>\n&lt;ul&gt;&lt;li&gt;&lt;a href=\"\/\"&gt; Parent Directory&lt;\/a&gt;&lt;\/li&gt;<br \/>\n&lt;li&gt;&lt;a href=\"nginx-1.12.2-1.el6.ngx.x86_64.rpm\"&gt; nginx-1.12.2-1.el6.ngx.x86_64.rpm&lt;\/a&gt;&lt;\/li&gt;<br \/>\n&lt;li&gt;&lt;a href=\"repodata\/\"&gt; repodata\/&lt;\/a&gt;&lt;\/li&gt;<br \/>\n&lt;\/ul&gt;<br \/>\n&lt;\/body&gt;&lt;\/html&gt;<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bei cURL Aufrufen landet man oft auf Seiten, die nur einen REDIRECT auf einen andere Seiten ausf\u00fchren. &lt; p class=&#8221;kasten&#8221;> [root@0ccfa08b0829 \/]# curl repository\/yum&gt;\/strong&gt; &lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/IETF\/\/DTD HTML 2.0\/\/EN&#8221;&gt; &lt;html&gt;&lt;head&gt; &lt;title&gt;301 Moved Permanently&lt;\/title&gt; &lt;\/head&gt;&lt;body&gt; &lt;h1&gt;Moved Permanently&lt;\/h1&gt; &lt;p&gt;The document has moved &lt;a href=&#8221;http:\/\/repository\/yum\/&#8221;&gt;here&lt;\/a&gt;.&lt;\/p&gt; &lt;\/body&gt;&lt;\/html&gt; So funktioniert es: &lt; p class=&#8221;kasten&#8221;> [root@0ccfa08b0829 \/]# curl repository\/yum -L &lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 3.2 Final\/\/EN&#8221;&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Index of \/yum&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; &lt;h1&gt;Index of \/yum&lt;\/h1&gt; &lt;ul&gt;&lt;li&gt;&lt;a href=&#8221;\/&#8221;&gt; Parent Directory&lt;\/a&gt;&lt;\/li&gt; &lt;li&gt;&lt;a href=&#8221;nginx-1.12.2-1.el6.ngx.x86_64.rpm&#8221;&gt; nginx-1.12.2-1.el6.ngx.x86_64.rpm&lt;\/a&gt;&lt;\/li&gt; &lt;li&gt;&lt;a href=&#8221;repodata\/&#8221;&gt; repodata\/&lt;\/a&gt;&lt;\/li&gt; &lt;\/ul&gt; &lt;\/body&gt;&lt;\/html&gt;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[53,80],"class_list":["post-460","post","type-post","status-publish","format-standard","hentry","category-middleware","tag-curl","tag-redirect"],"_links":{"self":[{"href":"https:\/\/techno.slomka.biz\/index.php?rest_route=\/wp\/v2\/posts\/460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techno.slomka.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techno.slomka.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techno.slomka.biz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techno.slomka.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=460"}],"version-history":[{"count":0,"href":"https:\/\/techno.slomka.biz\/index.php?rest_route=\/wp\/v2\/posts\/460\/revisions"}],"wp:attachment":[{"href":"https:\/\/techno.slomka.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techno.slomka.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techno.slomka.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}