Reputation: 187
I've installed a Wordpress plugin that makes my website to a static one. The plugin is called "Simply Static".
Now I have a static version of my website here: http://example.com/wp-content/uploads/static/
But my visitors should not see the whole url, i want them just to see http://example.com or e.g.: http://example.com/contact/ instead of http://example.com/wp-content/uploads/static/contact/
However I can't seem to modify the htaccess to rewrite this.
I've tried:
RewriteEngine On
RewriteRule !^/ /wp-content/uploads/static/%{REQUEST_URI} [L,R=301]
Any ideas appreciated!
Upvotes: 2
Views: 214
Reputation: 74018
To rewrite from /
to /wp-content/uploads/static
, you just use
RewriteRule !^wp-content/uploads/static /wp-content/uploads/static%{REQUEST_URI} [L]
Note the following
%{REQUEST_URI}
already contains a leading slashR|redirect
flagUpvotes: 1