/wp-content/plugins/wp-captcha/assets/images/c4wp-logo.JPG
rewrite to ->
/wp-content/plugins/wp-captcha/assets/images/c4wp-logo.jpg
I have a WordPress 4.2.2 running with 45+ sites. We just upgraded from 3.5 to 4.2.2 which was a great deal. Problem is that the media-uploader is now broken.
I’m working with sub-directories
The media upload now only works on the main site after I changed the upload path via Network > Sites > Settings
to wp-content/blogs.dir/1/files
.
When I go to a sub-site to upload a file it gives me this url:
https://santexo.acsrackserver2.nl/bouwbedrijfpostma/files/2015/05/media_xll_1105222.jpg which wordpress processes to:
https://santexo.acsrackserver2.nl/wp-includes/ms-files.php?file=2015/05/media_xll_1105222.jpg which doesn’t work.
When I put the blogname into the url like this:https://santexo.acsrackserver2.nl/bouwbedrijfpostma/wp-includes/ms-files.php?file=2015/05/media_xll_1105222.jpg it does work.
Here is my .htaccess (i copied it from the old site)
<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 [R=301,L]
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-content/uploads/$2 [R=301,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 ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule ^snelstart/(.*\.xml) snelstart/orders.php [NC,L] # Handle product requests
RewriteRule . index.php [L]
</IfModule>
I have been searching all over the net, but I just can’t find any topic that has a solution..
Any one have an idea what’s wrong?
]]><?php
$leavecomment='<img src="' .TEMPLATEPATH .
'/leavecomm.gif" width="134" height="23"
alt="Leave comment" align="middle"
style="padding-bottom: 9px;" border="0" />';
$onecomment='<img src="' .TEMPLATEPATH . '/comm.gif" alt="Comments: 1" width="90" height="23" align="middle" style="padding-bottom: 9px;" border="0" /> 1';
$quancomment='<img src="' .TEMPLATEPATH . '/comm.gif" alt="Comments:" width="90" height="23" align="middle" style="padding-bottom: 9px;" border="0" />';
comments_popup_link($leavecomment,$onecomment,$quancomment);
?>
The problem is that TEMPLATEPATH creates absolute path (/home/public_html/…), so the path to images is absolute and of course images don’t appear. I’ve tried to use bloginfo('template_directory');
, but php-code doesn’t work.
And the second problem: I don’t know how to display quantity of comments this way – like “Comments 5” with images: “IMG 5”
Hope my english is understandable. ^^
]]>https://vintagemaniac.net
I’m using .jpg’s as headings in my sidebars and it’s looking great BUT…whenever the shop is active (e.g. when you broswe it) the image-files in the sidebars get broken.
What happens is that in the the < img src >-tag gets an extra /blogg/main/ in the image paths:
https://www.vintagemaniac.net/blogg/main/blogg/main/wp-content/themes/yellowhite3c-100/yellowhite3c-100/images/blogglistan.jpg
It’s only supposed to be there once. Anyone know why this happen and how to fix it?
Thankful for any help!!
]]>Is it possible to setup something like <img src=”<?php TEMPLATEPATH ?>/images/whatever.jpg”>
]]>