Answer the question
In order to leave comments, you need to log in
Remove folder from URL?
Hello!
I found on the forums that in order to protect against site hacking, you need to install the site in a folder with short names.
The site follows the path
site/wordpress_fdg85j2g8ui8fn/
access in the browser occurs along the path
site.com
Everything is fine, but when opening images, their full path
is written site.com/wordpress_fdg85j2g8ui8fn/wp-content/uploa...
And the whole point of such protection is lost.
If you write in .htaccess to remove part of the URL and get site.com/wp-content/uploads/2013/12/logo2.png
RewriteCond %{REQUEST_URI} ^/wordpress_fdg85j2g8ui8fn
RewriteRule ^wordpress_fdg85j2g8ui8fn(.*)$ site.com/$1 [ R=301,L]
We get the desired URL, but there is no file at this URL, and when accessing it, a 404 error occurs.
Is there any way to fix this?
Answer the question
In order to leave comments, you need to log in
It is better to set the rights you need to folders with files, less problems - more results.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question