View Full Version : 500 and 404 redirect ?
Xencored
05-11-2010, 01:24 PM
Hey
is there a way i can redirect all these pages to my main index.php
Due to 4.0 and me no longer needed wordpress i have tons of dead old links
and dont want to miss that traffic :o
Thanks
p.s i tryed this code in .htaccess without any luck
ErrorDocument 404 /index.php
ErrorDocument 500 /index.php
Angel-Wings
05-11-2010, 01:57 PM
AllowOverride not set correctly ?
And if you're on your own machine, why don't configure everything directly in the Webserver - speeds up things if the lookup for .htaccess in each directory can be skipped.
Xencored
05-11-2010, 03:08 PM
AllowOverride not set correctly ?
And if you're on your own machine, why don't configure everything directly in the Webserver - speeds up things if the lookup for .htaccess in each directory can be skipped.
Hi mate i have no idea what your talking about and how to do it lol sorry
i only found this code on Google and tryed it
Also aye i own my own server
Thanks
Angel-Wings
05-11-2010, 10:21 PM
Hello :)
The code looks ok so far, still instead of trying it the "htaccess" way you can also do it directly in your Webserver:
<VirtualHost www.example.com>
ErrorDocument 404 /index.php
ErrorDocument 500 /index.php
...
DocumentRoot /this/is/an/example/
<Directory "/this/is/an/example/">
AllowOverride None
...
</Directory>
</VirtualHost>
This would set your Error Documents directly in the configured Host without any htaccess directives.
Additionally the "AllowOverride None" directive disables "htaccess" completely - Apache is a bit faster then because the lookup for ".htaccess" isn't done.
Instead of writing .htaccess for each single directory, configure it directly in the Webserver config if possible and disable it with "AllowOverride None"
http://httpd.apache.org/docs/2.2/misc/perf-tuning.html
Explains the reasons :)
Xencored
05-15-2010, 05:58 PM
Thanks mate ill look into it :up:
Mike
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.