If you want to validate a XML file here are a few tools:
Archive for the ‘Web Maintenance’ Category
Parsing PHP in HTML
If you’re on an Apache Server, with Mod_rewrite installed, you can have the server parse PHP code in .html files by adding this code to your .htaccess file:
AddType application/x-httpd-php .php .htm .html
Prevent Image Hotlinking
You can prevent “Image Hotlinking” with .htaccess if you’re on an Apache Server with Mod_rewrite installed. Here are a few tutorials:
Prevent Hotlinking With htaccess
Smarter Image Hotlinking Prevention
How can I prevent hotlinking?
Preventing hot linking of images
Kill Hotlinks
Apache Rewrite Module
Server Response Codes
Here is a list of the Server Response Codes and what they mean.
HTTP/1.1: Status Code Definitions
Custom Error Responses
If you’re on an Apache Server, with Mod_rewrite installed, you can create custom error messages for server errors.
Action Choices: [See Apache Manual]
Display Text
Redirect to External URL
Redirect to Local URL
Example lines of code for .htaccess file:
ErrorDocument 403 "Goodbye.
ErrorDocument 404 http://www.otherdomain.com/
ErrorDocument 404 /custom404.htm
.htaccess: Parent Directory
Add this line of code in your .htaccess file to prevent parent directories from being viewed.
Options -Indexes
Internet Connection Speed
If you would like to test your internet connection speed here is a link to McAfee’s Internet Connection Speedometer.
Change Default Directory Page
If you want to change your default directory page from “index” to something else, and you’re on an Apache Server, with Mod_rewrite installed, you can add this code to your .htaccess file:
DirectoryIndex otherpage.html
You can also set it up so that if the default page isn’t found that another takes its place:
DirectoryIndex otherpage.html differentpage.html
Of course, use the appropriate file extension for your web pages [.html, .php, etc.]
…or you use a simple redirect in the default page:
< ?php
header( 'HTTP/1.1 301 Moved Permanently' );
header( 'Location: http://'.$_SERVER['HTTP_HOST'].'/otherpage.php' );
?>
