|
Showing: 1-10 of 10
Questions:
|
|
 |
How can I rewrite / redirect URLs using apache and mod_rewrite?
Set up an .htaccess file with lines like this:
RewriteEngine OnRewriteRule .html$ redirect.php
This will redirect all *.html files to a file...
|
|
|
|
 |
How do I password protect a directory on my website?
Create a file in the protected directory called .htaccess (leading . is important)In that file, put these lines:
AuthName "Section...
|
|
|
|
 |
How do I turn off my website for maintenance?
To redirect all requests for your site to a "maintenance" url, use mod_rewrite. I also found this useful when migrating...
|
|
|
|
 |
I'm seeing funny characters or boxes on my website after upgrading / moving to a new server. How do I fix it?
If you have any special characters in your html code, like », or ®, you need to make sure Apache...
|
|
|
|
 |
How can I block links from another website to my website?
There are some sites out there that "steal" your content by dynamically pulling your content into their iframe (website). The...
|
|
|
|
 |
How can I redirect incorrect hostnames to the proper one?
Sometimes people access your site using a different hostname than you'd prefer. This example shows how to redirect a person...
|
|
|
|
 |
How can I set up a proper 301 redirect with an htaccess file?
When moving pages around on your website, it's important to set up redirects to the new pages, so that search...
|
|
|
|
 |
How can I force my php scripts to run php5 ?
Some hosting providers are still using php 4 as their default for scripts, but offer php5 as well. To force...
|
|
|
|
 |
How can I see what virtual hosts apache is loading when it starts up?
After restarting apache, run this command:
apachectl -S
This dumps all the virtual hosts loaded by apache, and other useful information....
|
|
|
|
 |
How can I check if a php script is running on SSL?
Sometimes you need to make sure your script is running on SSL, for security purposes. Here's a short function you...
|
|
|
|