4/27/2024 0 Comments Using pdo with plesk godaddy![]() You can override this to set a default index page as follows (replace first.html with the page you want displayed): #Set default index page htaccess: Change default index pageīy default, your server will attempt to display index.htm, then index.html, then index.php, and then default.htm as the first page of your website. ![]() Here are a few more handy things you can do with. Related: Speeding up WordPress with memcached and W3 Total Cache Miscellaneous To prevent users from uploading massive, resource-hogging files, limit the file upload size using. ExpiresActive OnĮxpiresByType image/jpg "access plus 1 year"ĮxpiresByType image/jpeg "access plus 1 year"ĮxpiresByType image/gif "access plus 1 year"ĮxpiresByType image/png "access plus 1 year"ĮxpiresByType text/css "access plus 1 month"ĮxpiresByType application/pdf "access plus 1 month"ĮxpiresByType text/x-javascript "access plus 1 month"ĮxpiresByType application/x-shockwave-flash "access plus 1 month"ĮxpiresByType image/x-icon "access plus 1 year"ĮxpiresDefault "access plus 2 days" Limit file upload size You can set the duration of the cache for each item using all the standard time units, including years, months, weeks, days, hours, minutes and seconds. In order to capitalize on this, you have to set an expiration date for each type of file you want cached. The module is already enabled on most servers, but you’ll need to add the line below to actually use it: AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript Set expires headersīrowser caching speeds up your website significantly. This can reduce the amount of bandwidth your site uses, although it won’t necessarily speed up your site. The Apache mod_deflate module can compress data using gzip compression before transmitting it to the user. With it, you can enable file compression and exert some control over caching, which can substantially speed up your site. You can also modify the above to show an alternate image instead of the one that’s hotlinked, typically one that says something like “No hotlinking allowed!” To do so, change the last line to this: RewriteRule \.(jpg|jpeg|png|gif)$ Site optimization using. ![]() htaccessįor search engine optimization, it’s often recommended to stick strictly to a to your site name): #Force WWW ![]() You only have to use this once and it will apply from then on in the file unless you turn it off. Perhaps that page no longer exists, or maybe you want to forward them from a non-Note that a lot of these examples begin with the directive RewriteEngine on. Sometimes you need to redirect users to a page other than the one they linked to from their web browser. htaccess to work: URL redirects and rewriting The dot at the beginning of the file name tells Unix/Linux systems to hide this file, so when using file manager, be sure to tick the checkbox for “show hidden files” or you might not be able to find it. What’s the dot at the beginning of the filename for? htaccess.old and that should bring it back up. If you do crash your website and for some reason don’t have a backup, don’t panic - simply rename. htaccess file you can easily break your website, so create a backup first. Related: cPanel tips and tricks that will make your life easier Don’t forget to create a backup. You will now be in the text editor, where you can make and save changes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |