Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
.htaccess ErrorDocument - Odd Behavior
Old 06-24-2011, 03:12 PM Unhappy .htaccess ErrorDocument - Odd Behavior
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
I've never messed with .htaccess files before, but this should be pretty simple. I have an ErrorDocument handler in my .htaccess file, and this is it:

My entire .htaccess file is below, from line 0 to 1:

Code:
ErrorDocument 404 index.php?error=true
However, if I go to mywebsite.com/asdlfkasfasdf.php (obviously doesn't exist), it just shows on the screen 'index.php?error=true' as if it were text. I would understand this if I had quotes wrapped around it, but there aren't. No Quotes..

Why is this doing this? How can I fix it?

Thanks!
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-24-2011, 03:31 PM Re: .htaccess ErrorDocument - Odd Behavior
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Try:
Code:
ErrorDocument 404 /index.php?error=true
or
Code:
ErrorDocument 404 http://yoursite.com/index.php?error=true
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 06-24-2011, 03:45 PM Re: .htaccess ErrorDocument - Odd Behavior
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
Ah, thanks Null! The first one didn't work, it returned an 'Additionally, an 404 was found while trying to use an ErrorDocument...'. The second one worked perfectly, though, although I hate using absolute URLs.

Thanks!!
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to .htaccess ErrorDocument - Odd Behavior
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11847 seconds with 12 queries