How to unblock font awesome icons on wordpress - wordpress

I have used a theme on wordpress named "SATINE" and I have finished my website but I have a problem that I have not face it yet. This theme is using FontAwesome icons in some places that are configured via widgets section. The problem is that that FontAwesome Icons are not showing on the website. Instead of icons there are replaced with squares like here (Printscreen: http://prntscr.com/j4znsc). I checked my error logs on Plesk and I found this ( Printscreen: http://prntscr.com/j4zoae). I think that It has to do with SSL and with the file .htaccess but I cannot configure it right. I am pasting my .htaccess file here so you can see what its written inside and help me or give me a hint.
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Can anyone help me or does anyone have already faced the same problem with me?
I think it has to do with this line:
<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
but I dont know how to configure it right.
Thank you,
Best regards

I think your syntax is incorrect, try this with the leading forward slash.
<IfModule mod_headers.c>
<FilesMatch "\.(eot|ttf|otf|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>

Related

htaccess rules on apache2

I need a ligth on an .htaccess file that i dont understand.
I am using linux with apache2 and cant figure what is wrong.
I had this working but changed something and not working anymore.
Here is the .htaccess. I want to say i just start to fix bugs in this legacy software. I am more a Js than php developer.
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=edge" "expr=%{CONTENT_TYPE} =~ m#text/html#i"
Header set X-Content-Type-Options "nosniff"
<FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
# 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
Im using a virtual host.
I can see myhost.com but soon a click a link, i get a 404 not found error
i know is something with apache or php , because this code is working in another server. I supose. They say so.
Please. Thanks.
Sorry i had a typo on sites available conf file

Wordpress website: .htaccess erased

I have a website made with wordpress 4.2.2. Sometimes my .htaccess is erase by an older version, which look like that.
# 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
I've added many PermanentRedirect under the "RewriteRule . /index.php [L]" line. Only these lines desappears.
I already looked here and there
None of the plugins interract with the .htaccess and it's not he whole content that disappear.
I don't have any clue of what could be the origin of this issue.
EDIT: It seems that every time someone access the permalink setting page, the .htaccess is erase.
WordPress considers anything between the # BEGIN WordPress and # END WordPress to be its "territory". It uses those comments to find and replace its own rules when updates are necessary.
If you want to add custom rules, you must add them outside that block so WordPress does not overwrite them.
Sorry for the lack of update.
Still don't know how my code got overwritten previously, but putting my rules outside # BEGIN WordPress and # END WordPress comment-line did the trick.

Addon Domain Images NOT LOADING Htaccess Wordpress

Im having problem with my addon domain, on my primary domain everything works fine, I have the wordpress installed and running perfectly using the following htaccess:
RewriteCond %{HTTP_HOST} ^(www\.)?addon-domain\.com
Rewriterule .* - [L]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
On addon domain subfolder It's working and loading site like an individual domain as I wish it to be but images are not loading, the following addon domain htaccess file:
Options -MultiViews -Indexes +FollowSymlinks
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>
RewriteCond %{HTTP_HOST} ^addon\-domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.addon\-domain\.com$
RewriteRule ^/?$ "http\:\/\/domain\.com\/addon\-domain\.com" [R=301,L]
Now... I tried hotlink disabled, enabled with rules for each domain and addon, not deal... tried removing domain htaccess and nothing happeans.
Im running a videoscript in addon domain and thumbnails for videos works fine, when I upload images it's loading normally, but all css images and subfolders images like logo arent. :-(
I can access css, js and other templates files using direct address but no one single image file opens... on firefox i got this error message:
The image "http://addon-domain.com/templates/frontend/default/images/videozoom.png" cannot be displayed because it contain errors.
And all other images in different folders display same message... I have only Htacces file on root domain and addondomain folder.
Any help will be appreciated.
just add your site to hotlink protection and everything will work fine =D

WordPress arabic permalinks

I'm creating an arabic blog, using the arabic version of wordpress, but when I set the permalink configuration to use the post name, I get a not found error message with similar text to:
The requested URL /سيبس/ was not found on this server.
Does anybody have any clues ?
and thanks for your support to me :)
I have solved my problem, and what was going wrong is my .htaccess file, when installing an arabic wordpress blog locally, I noticed that it was working very well, so I made a comparaison and I noticed that by local .htaccess has content when the other doesn't.
So what solved my problem is putting the following code in my website .htaccess file:
# 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

Problem with htaccess file. Wordpress Plugin tells me there is one, I can't find one?

i have an really unusual problem i've never had before.
i've no .htaccess file on my server. looked everywhere, there is just no file, but a Wordpress Plugin (AskApacheRewriteRules) tells me that the following Rules are active:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
any idea why that could be, i've already wrote my hosting provider, but their service isn't the best.
even if i create an htaccess file with other rules and save it to my root of the server, it doesn't change anything. The plugin always tells me the same and i believe the plugin, because i'm having issues with the /index.php/ in my url (that i don't want to have).
any ideas?
On the AskApacheRewriteRules options page, did you make sure that using_index_permalinks is set to false and that using_mod_rewrite_permalinks is set to true? If this isn't the case, WordPress will attempt to use PATH_INFO for your permalinks, resulting in /index.php/(permalink_structure).
Note that the WordPress rewrite class stores its rewrite rules as a WordPress option in the database, which is where AskApacheRewriteRules gets its information. The plugin also apparently formats the rules with the mod_rewrite_rules function before echoing them to the page, which will surround them with:
<IfModule mod_rewrite.c>
...
</IfModule>
So, the likely reason you can't find the .htaccess file is because it doesn't exist; the rules are just present in the database. The reason why the rules are present in the database is because you're using permalinks, and this is the auto-generated WordPress ruleset, which is saved regardless of whether it's actually being used or not.
Edit: You must have a .htaccess file in the root of your web directory with the following contents:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If mod_rewrite isn't available, we'll do this a hackish (and bad) way...
ErrorDocument 404 /index.php
</IfModule>
The rewrite_rules option is stored at SELECT option_value FROM wp_options WHERE option_name = 'rewrite_rules', but it gets regenerated every time you change the permalink, and isn't used except for writing to .htaccess from what I can tell.
Anyway, those are definitely the correct rules for what you want to do. Are you sure that mod_rewrite is enabled on your host?
Edit:
Let's make 100% sure that mod_rewrite is working correctly and go from there.
Create a .htaccess file in your web root with the following rules, exactly as written:
RewriteEngine On
RewriteRule ^rwtest http://stackoverflow.com/ [R,L]
Then go to your site with the URL example.com/rwtest and see if you get redirected to StackOverflow. If not, something is wrong with mod_rewrite. If you do, then at least we know that piece isn't the problem.
Have you checked if it's defined in your apache configuration file (it appears that the plug is showing an excerpt from that).

Resources