Hello guys,
My first post about: Roots.io Bedrock - WordPress + (sub-domain | sub-directory) + Caddy
Today, the WP from Bedrock give me the tip:
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) wp/$1 [L]
RewriteRule ^(.*\.php)$ wp/$1 [L]
RewriteRule . index.php [L]
The goal:
- hide the
wp
directory. - hide the
/index.php/
to permalink structure into WordPress
Note: I have a WordPress with Roots Bedrock and Multisite.
MyCaddyfile Caddyfile:
(wordpress) {
rewrite {
r ^/index.php/(.+)$
to /{1} /index.php?{1}
}
rewrite {
if {path} not_match ^((\/wp)?(\/wp-admin))(\/network)?
to {path} {path}/ /index.php{query}
}
}
It works, but do not remove the wp directory.
I have tried an attempt - no sense, yeah:
rewrite /wp {
r ^(wp-(content|admin|includes).*)
to /wp/{1}
}
Any suggestions? Idea?