Access Denied in access CSS or JS in view folder Codeigniter

Access Denied in access CSS or JS in view folder – Codeigniter

Firstly, Please Check the view folder if there is any .Htaccess file.

Check the file if there is

<IfModule authz_core_module>
      Require all denied
</IfModule>

<IfModule !authz_core_module>
      Deny from all
</IfModule>

Remove the Above code & check. Now the view folder is access able from URL link.

 

 

Redirect a WordPress site from non-WWW to WWW

Redirect a WordPress site from non-WWW to WWW

The following tutorial will show you how to redirect your WordPress site’s domain from non-www to www or vice versa. Redirecting one to the other is useful for SEO.

If you go to https://www.wordpress.org, you’ll see the URL changes a bit once you click enter. It goes to the non-www version. In order words, it goes to https://wordpress.org. It’s a subtle change and it’s usually not noticed by users.

So why have they done this? It’s because, technically, the two are different domains but they have the same content. Without the redirect, they end up with duplicate content. With the redirect, they only have one site, so only one set of content.

With only one set of content, they guarantee they won’t be penalized by search engines or have their ranking split.

To move your site to non-www, find your .htaccess file using your host’s file manager or an FTP client.

Within it, look for the following code:

RewriteEngine On

If the code isn’t there, insert it at the top of your file.

Then, to redirect non-www to www, use the following code directly below RewriteEngine On:

RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]

For www to non-www, use:

RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

 

Disable cache in server using htaccess

Disable cache in server using htaccess
after refreshing showing same page in Codeigniter,
after logout in showing active sessions again in codeigniter,
stores in caching and blocks to fetch new page from server,
Disable cache in server,
block cache by htaccess,
# DISABLE CACHING
<IfModule mod_headers.c>
Header set Cache-Control “no-cache, no-store, must-revalidate”
Header set Pragma “no-cache”
Header set Expires 0
</IfModule>

PageSpeed: Leverage browser caching

PageSpeed: Leverage browser caching

Find your .htaccess file in the root of your domain. This file is a hidden file but should show up in FTP clients like FileZilla or CORE. You can edit the .htaccess file with notepad or any form of basic text editor.




In this file we will set our caching parameters to tell the browser what types of files to cache.




## EXPIRES CACHING ##

<IfModule mod_expires.c>

ExpiresActive On

ExpiresByType image/jpg "access plus 1 year"

ExpiresByType image/jpeg "access plus 1 year"

ExpiresByType image/gif "access plus 1 year"

ExpiresByType image/png "access plus 1 year"

ExpiresByType text/css "access plus 1 month"

ExpiresByType application/pdf "access plus 1 month"

ExpiresByType text/x-javascript "access plus 1 month"

ExpiresByType application/x-shockwave-flash "access plus 1 month"

ExpiresByType image/x-icon "access plus 1 year"

ExpiresDefault "access plus 2 days"

</IfModule>

## EXPIRES CACHING ##




Source: https://gtmetrix.com/leverage-browser-caching.html

.htaccess redirect http to https

use the following to redirect all pages of my domain from http to https: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]