<?xml version="1.0" encoding="UTF-8"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Steven Rosenberg</title>
        <link>https://stevenrosenberg.nfshost.com/blog/applications/web_servers/apache/</link>
        <description>frugal technology, simple living and guerrilla large-appliance repair</description>
        <language>en</language>
        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
        <generator><!-- name="generator" content="ode/1.2.1" --></generator>
        <managingEditor>steven@stevenrosenberg.net (Steven Rosenberg)</managingEditor>
        <webMaster>steven@stevenrosenberg.net (Steven Rosenberg)</webMaster>
        <atom:link href="https://stevenrosenberg.nfshost.com/blog/index.rss2" rel="self" type="application/rss+xml" />


        <item>
            <title>Use an .htaccess rewrite to force trailing slashes at the end of URLs</title>
            <link>https://stevenrosenberg.nfshost.com/blog/applications/web_servers/apache/2018_0129_use_htaccess_rewrite_to_force_trailing_slash_at_the_end_of_urls</link>
            <description><![CDATA[ <p>I'm looking into this very thing -- using <code>.htaccess</code> to force trailing slashes at the end of URLs requested on the Apache web server.</p>

<p>Stack Overflow <a href="https://stackoverflow.com/questions/7780859/htaccess-rewrite-to-force-trailing-slash-at-the-end">may have the answer</a>:</p>

<pre><code>RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)([^/])$        /$1/ [L,R=301]
</code></pre>

<p>As <a href="https://stackoverflow.com/a/9844543">SO user jeffbyrnes says</a>,</p>

<blockquote>
  <p>The <code>RewriteCond</code> will check to make sure there's no files with that name, and if not, perform the <code>RewriteRule</code>. More future-proof than having a manual list of extensions!</p>
</blockquote>

<p>I don't have time right now to hack this onto a server, but I will for sure be giving it a try.</p>
 ]]></description>
            <pubDate>Mon, 29 Jan 2018 18:14:05 UTC</pubDate>
            <guid>https://stevenrosenberg.nfshost.com/blog/2018/01/29/18/14/05/</guid>
       </item>


    </channel>
</rss>
