PDA

View Full Version : SE Friendly URLs - Custom Error Pages



Mike
04-02-2006, 12:13 PM
Hi all,

I've used the custom error method for SE friendly URLs once before, but I can't remember how it worked at all.

At the moment I've got this in my .htaccess file:



ErrorDocument 404 http://www.site.com/directory/processor.php


I try to go to http://www.site.com/directory/2/2/ for example, and I am automatically directed to processor.php meaning the script won't work. My understanding was (and this worked last time I tried), the processor.php file would somehow be embedded in the 404 file, so you could count the elements in the URL etc.

Anyone know what's wrong?

Thanks,
Mike

FPU
04-02-2006, 04:09 PM
I don't know, but I will send a link to this thread to Nintendo and maybe he can help out Mike!

Sean
04-02-2006, 04:38 PM
have you done all the other stuff on this page?

http://www.websitepublisher.net/article/search_engine_friendly

sounds like you might need to add the HTTP header.

Chris
04-02-2006, 06:23 PM
is "directory" an actual directory or not?

if it is, get rid of it and put processor.php in your root.

Nintendo
04-03-2006, 02:18 AM
Try a static html page with oiut the complete URL, like

ErrorDocument 404 /whatever.html

though a php should also work.

Mike
04-03-2006, 08:39 AM
Brilliant, put the things in the root and didn't put the whole URL and it worked. Cheers guys :)

FPU
04-03-2006, 03:17 PM
Hey Mike, did you say Nintendo was Brilliant ??? :eek2:

All this time I have thought of him as a crazy WACKO! :lol:

Nintendo
04-03-2006, 06:08 PM
Bah!!! I am da King of da Wackos, not even close to brilliant!!! grrr!!! heck, even SitePoint voted me as there official King of da Wackos for the year!!! :D:D:D:D:D

FPU
04-03-2006, 06:13 PM
Sitepoint? :eek: :rage: