php - .htaccess to rewrite image urls -
hello im having problem images in wordpress directory plug-in doesnt have support, i've fixed bits images. know have alter .htaccess in root im not sure how.
heres current .htaccess looks 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
my site doesnt load images in plugin, when inspecting sourcecode on chrome looking image @ following url, gives 404 error.
the correct url image be:
http://www.example.com/wp-content/plugins/wprx/wpt_image.php?i=/wp-content/wpt_cache/7/1713/01.jpg
any ideas on altering .htaccess remove "http://www.example.com//" start of url?
many thanks, pete
disclaimer:
while you're asking possible, should not choose solution, instead find , resolve cause of problem.
because browser still looking
http://www.example.com//http://www.example.com/wp-content/plugins/wprx/wpt_image.php?i=/wp-content/wpt_cache/7/1713/01.jpg
after this, provide file then.
this bad solution!
how to:
in path passed .htaccess file, protocol, host , port have been stripped, leaving
//http://www.example.com/wp-content/plugins/wprx/wpt_image.php?i=/wp-content/wpt_cache/7/1713/01.jpg
so want remove second http://www.example.com
.
putting following line right after rewritebase
should make kind of work:
rewriterule ^//http://www.example.com/(.*)$ /$1
Comments
Post a Comment