CORS policy: No ‘Access-Control-Allow-Origin’

Font from origin domain.dev has been blocked… (CORS and browsersync)

If you are getting issue fonts are blocked in web client CORS then below code will help you. Use the code in .htaccess file and problem will be resolved 🙂
# Allow access from all domains for webfonts.
<IfModule mod_headers.c>
<FilesMatch “\.(ttf|ttc|otf|eot|woff|woff2|font.css|css)$”>
Header set Access-Control-Allow-Origin “*”
</FilesMatch>
</IfModule>

Redirect all url to https

If you have a secure certificate (SSL) on your website, you can automatically redirect visitors to the secured (HTTPS) version of your website to make sure their information is protected.

Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

If you have an existing .htaccess file:

  • Do not duplicate RewriteEngine On.
  • Make sure the lines beginning RewriteCond and RewriteRule immediately follow the already-existing RewriteEngine On.

Media query for large screen

Here is media query for large screen. You can apply the breakpoints and enjoy the work.

@media screen and (min-width: 1400px) {

}
@media screen and (min-width: 1600px) {

}
@media screen and (min-width: 1900px) {

}

Enable error reporting in joomla

Sometime is not easy to find the site issues. So we must have to enable the error reporting while in development. Joomla uses PHP and when PHP has problems, it reports them to you.

Here is short tutorial for enable error reporting in joomla.

1- Go to Site > Global Configuration > Server > Error Reporting.
2- You have five choices: System Default: this allows error reporting to be determined by the php.ini file on your server. Development will show all error reporting.

System Default this allows error reporting to be determined by the php.ini file on your server.
None will disable all error reporting.
Simple will show Errors and Warnings but won’t show Notices.
Maximum will show Errors, Warnings and Notices.
Development will literally overwhelm you with feedback. If you’re not a developer, please don’t use this option.

 

Disble error reporting in joomla

Sometime is not easy to find the site issues. So we must have to enable the error reporting while in development. Joomla uses PHP and when PHP has problems, it reports them to you. However, often these errors will appear on your site and will be visible to visitors. So we must have to disable theme.

Here is short tutorial for enable or disable error reporting in joomla.

1- Go to Site > Global Configuration > Server > Error Reporting.
2- You have five choices: System Default: this allows error reporting to be determined by the php.ini file on your server. None will disable all error reporting.

System Default this allows error reporting to be determined by the php.ini file on your server.
None will disable all error reporting.
Simple will show Errors and Warnings but won’t show Notices.
Maximum will show Errors, Warnings and Notices.
Development will literally overwhelm you with feedback. If you’re not a developer, please don’t use this option.