• Hi,

    I read the Apache documentation on the rewrite_mod and I am trying to figure out what the RewriteRules in the .htaccess file for multi-domain do exactly.

    Here is the code:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

    Could you tell me where I get it wrong?

    RewriteRule ^index\.php$ - [L]
    To my understanding it does not do anything, the ‘-‘ making the matched string left as it is, and the [L] making it the last Rewrite rule processed.

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    I do not understand what the “^ – [L]” achieves here
    Same thing for:
    RewriteRule . index.php [L]

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you’re copy-pasting the rules that are provided (in the Network admin area) then it should work – if the server itself is set up properly.

    no knowledge or understanding of rewrite rules is required.

    Thread Starter Erikku

    (@erikku)

    I am not saying it does not work. I am asking what it does.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    RewriteRule ^index\.php$ - [L]

    That basically tells your site to HIDE index.php from view ?? Otherwise your URLs would be domain.com/index.php/YYYY/MM/DD/Postname

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘RewriteRule in .htaccess’ is closed to new replies.