Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your problem is, I think, due to this specific rewrite rule:</p> <pre><code> RewriteRule .* - [L] </code></pre> <p>Apache will read your htaccess in detail, line by line, and will try to map each rewrite rule in turn (+ conditions, obviously). Let's follow it in detail.</p> <pre><code> RewriteCond %{HTTP_HOST} !^www\.url\.com$ RewriteRule ^(.*) http://url.com/$1 [R=301,L] </code></pre> <p>These two by themselves are <strong>NOT</strong> fine but not the source of your problem. If the HTTP HOST is anything but www.url.com, it will redirect to <a href="http://url.com/" rel="nofollow">http://url.com/</a>... which is not www.url.com, which will then redirect to url.com. You have a potential infinite loop but only if the HTTP HOST is not www.url.com to start with. If it matched, due to the L flag, it breaks processing and returns the redirect.</p> <pre><code>Redirect 301 /index.php?page=download http://url.com/download </code></pre> <p>This line is fine. You're doing a 301 redirect to anyone who happens to know index.php?page=download.</p> <pre><code>RewriteCond %{ENV:REDIRECT_STATUS} 200 RewriteRule .* - [L] </code></pre> <p>This line is <strong>NOT</strong> fine. The rewrite condition specifies that, so far, anything that is not a redirect from above will work for the next rule. The next rule matches <strong>EVERYTHING</strong> (.* means everything. 0 or more characters of anything) and in-rewrites to -, which in mod_rewrite language is a do not touch flag. This is fine. However, <strong>the L flag breaks the chain and returns</strong>, which causes your download/ folder to show as the list of your actual download folder, which is the source of your 403 error.</p> <p>Remove the L flag to get the next rule to process:</p> <pre><code>RewriteRule ^download$ /index.php?page=download </code></pre> <p>Which is fine by itself.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload