• Scenario:

    -I create a file with phpinfo(); in it.
    -I scan for any references for mod_rewrite in the php info page
    -I see nothing and this tells my that the module is not present. Or to see for yourself: https://www.dave-adams.me/checkversion.php

    Outcome:
    -WordPress works anyways.

    Why?

    Upon inspection, WordPress creates or modifies the .htaccess file with something like:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Question: is this how WordPress works around the fact that mod_rewrite is not present? Or am I completely wrong?

Viewing 1 replies (of 1 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Question: is this how WordPress works around the fact that mod_rewrite is not present? Or am I completely wrong?

    Magic, with little elves? in the background. They’re on loan from Santa when he migrated from MT. ??

    The answer is that your server is running mod_rewrite but your PHP just doesn’t know it.

    See this part in your phpinfo() output?

    Server API 	CGI/FastCGI

    Your PHP installation is running in CGI mode so it doesn’t know about the Apache installation much. If it were the Apache module you’d see this

    Server API 	Apache 2.0 Handler

    And you would also see a whole Apache Environment section that your output is lacking.

Viewing 1 replies (of 1 total)
  • The topic ‘No mod_rewrite but WP works anyways. Why?’ is closed to new replies.