.htaccess Installation Confusion

I’m brand new to Pressbooks, and am looking at installing a local instance for our OER project at Columbus State. I was reading through the installation instructions, and it all made sense until I got near the very end. Everything is explained up to the point of:

.htaccess file:

RewriteEngine On
RewriteBase /~example/textopress/
RewriteRule ^index.php$ - [L]

add a trailing slash to /wp-admin

RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule [1]+/(wp-(content|admin|includes).) $1 [L]
RewriteRule [2]+/(.
.php)$ $1 [L]
RewriteRule . index.php [L]

I wanted to be sure I know what this is before adding it to my .htaccess file. Above this is an explanation of adding lines to the wp-config.php file for the ebook export plugins, but it doesn’t actually talk about the .htaccess file…

I just wanted to confirm that these RewriteRules are along the same lines, needed for downloading ebooks from Pressbooks?

Thanks,
~Hydy


  1. _0-9a-zA-Z- ↩︎

  2. _0-9a-zA-Z- ↩︎

These are, more or less, the WordPress defaults. More info here:

https://codex.wordpress.org/htaccess

Regards,

1 Like

Ah, Okay, needed for multisite and differing depending on subdomain or subdirectory.

Thanks for the link!