Apr
14
Use htaccess for 404 Redirect
April 14, 2008 |
When a website grows bigger and bigger, some old posts might be removed, it is common to have problems like 404 page not found. Instead of going to a 404 page, maybe you want to go to your homepage instead or some other page, you can do so by writing an htaccess file, the one below is an example of redirecting visitors to search.html when they encounter a 404 page not found.
ErrorDocument 404 http://exmple.com/search.html
Hope this helps!
Similar Posts
- Create Custom Error Pages Using htaccess PHP
- htaccess Explicitly Define Default Index File
- Block people from Certain URL Using htaccess
- Use htaccess to Deny Access to hidden Files
- Use htaccess with Site Maintenance Page
- htaccess Limit the Number of Concurrent Visitors to your Website
- htaccess Permanently redirect file or directory
- Use htaccess to Deny Access Directory Listing
- Google Text Translation Using htaccess
- htaccess Conditional Loop Redirect
- Use htaccess to Fake Different File Extension
- htaccess gzip for Faster Loading and Bandwidth Saving
- htaccess Require the www For Domain URL
- Set Local Timezone Using htaccess
- htaccess Remove the www From Domain URL
- Remove File Extension Using htaccess
- Force Files Like PDF Download using htaccess
- Useful mod_rewrite Resources
- Apache htaccess Prevent Users from Uploading and Executing Files
- Block IPs Using htaccess
- htaccess Deny Diractory Access During a Specific Time
- Deny Access to inc Files Using htaccess


































