.htaccess - Add a RewriteRule for WordPress multisite -
i have brand new wp multisite network (v 3.5.1) on sub-directories. i'm getting error images, subsites won't display them properly, being uploaded correctly. i'm pretty sure need add correct rewriterule .htaccess file in main site, such:
when image called anywhere in site, url is: example.com/subsitename/assets/sites/#/imagename.jpg
. want change image pulls from: example.com/assets/sites/#/imagename.jpg
, subsitename
, #
, , imagename.jpg
variables.
it seems should simple, i'm having hard time finding right syntax or example of else has solved issue. know proper rewriterule add?
my current .htaccess file contains this:
rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] # add trailing slash /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 ^([_0-9a-za-z-]+/)?(wp-(content|admin|includes).*) $2 [l] rewriterule ^([_0-9a-za-z-]+/)?(.*\.php)$ $2 [l] rewriterule . index.php [l]
try instead:
# begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] # uploaded files rewriterule ^([_0-9a-za-z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [l] # add trailing slash /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 ^[_0-9a-za-z-]+/(wp-(content|admin|includes).*) $1 [l] rewriterule ^[_0-9a-za-z-]+/(.*\.php)$ $1 [l] rewriterule . index.php [l] </ifmodule> # end wordpress
Comments
Post a Comment