NodeHost
WordPress
Pricing
About us
Blog
Login
Join
Documentation
📁 All
💼 Organizations
🔌 API
🪧 Questions
📚 Setup Guides
📘 Panel
⌨️ Code Snippets
📙 Policies
How to calculate real CPU usage in a PHP script
Simple function you need to add to begin is the following. This will let us compute the results.
⌨️ Code Snippets
Calculate how long a PHP script takes to run
Now this one is simple, everything is already in place in PHP, first just add this line before the code you want to measure.
⌨️ Code Snippets
Redirect non WWW urls to WWW using just .htaccess
This is a simple rule for .htaccess to redirect all non www urls to www.
⌨️ Code Snippets
How to redirect subdomain to folder using .htaccess
NodeHost handles subdomains and domains on the same site as the same. However you still might need to handle subdomains as subdirectories of your main domain. Luckily, this can be easily done with some .htaccess.
⌨️ Code Snippets
How to redirect HTTP to HTTPS using .htaccess
You can automatically redirect visitors to the secured (HTTPS) version of your site to make sure your communications are encrypted by using the following rules in a .htaccess file.
⌨️ Code Snippets