Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #234522

    racerstodeath
    Participant

    Hi,

    I am trying to secure my WordPress installation with this .htaccess file

    order deny,allow
    deny from all
    <files ~ ".(xml|css|jpe?g|png|gif|js|svg)$">
    allow from all
    </files>

    But it seems like the icons are being blocked as well. What kind of file type do I need to allow to make it work?

    #234709

    Friech
    Moderator

    Hi There,

    Thank you for writing in! Maybe that is because of the Cross Origin Resource Policy. See http://enable-cors.org/ for the solution.

    Hope it helps, Cheers!

    #234753

    racerstodeath
    Participant

    Hi,

    Here is the solution to the problem I have.

    order deny,allow
    deny from all
    <files ~ ".(xml|css|jpe?g|png|gif|js|ico|ttf|otf|eot|woff)$">
    allow from all
    </files>

    To confirm for others, this .htaccess file is only used in your /wp-content to limit which files are accessible to others. From others on the internet, this increases the security of your wordpress install.

    #234900

    Paul R
    Moderator

    Hi,

    Glad you were able too figure it out.

    Have a nice day!