I have a problem on my site http://www.spellenblog.nl
When you go to the site everything is o.k., but when you write a wrong url like http://www.spellenblog.nl/werwer it displaying the index.php page.
Is there a way to change it that it goes to /errordoc/404.html ?
htaccess non existing pages
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: htaccess non existing pages
You can do that by editing your Serendipity Configuration and setting URL Rewriting to "none".
You will loose the "pretty" URLs when doing this, though. If you really need a 404 page, you can edit your index.php file and look for
Change that include_once to include the 404 file you want to show. Or replace it with "exit;" instead, then your users only get a 404 error.
Regards,
Garvin
You will loose the "pretty" URLs when doing this, though. If you really need a 404 page, you can edit your index.php file and look for
Code: Select all
} else {
header('HTTP/1.0 404 Not found');
include_once(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
// printf('<div class="serendipity_msg_important">' . DOCUMENT_NOT_FOUND .
}
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
When I replace the original page ( include/genpage.inc.php ) into errordoc/404.html I get a fatal error
Fatal error: Call to a member function on a non-object in /xxx/xxx/xxx/www.spellenblog.nl/htdocs/index.php on line 314
Fatal error: Call to a member function on a non-object in /xxx/xxx/xxx/www.spellenblog.nl/htdocs/index.php on line 314
-
- Regular
- Posts: 340
- Joined: Sun Jun 12, 2005 5:28 am
i actually like this rewrite .![Smile :)](./images/smilies/icon_smile.gif)
however i t does not completely render the page. the logo doesnt display.
if u go to http://myschizobuddy.com/uploads/ it goes back to index.php, but the logo is missing from the site![Confused :?](./images/smilies/icon_confused.gif)
![Smile :)](./images/smilies/icon_smile.gif)
however i t does not completely render the page. the logo doesnt display.
if u go to http://myschizobuddy.com/uploads/ it goes back to index.php, but the logo is missing from the site
![Confused :?](./images/smilies/icon_confused.gif)
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
MySchizoBuddy - the logo is missing because:
you are using a relative directory reference here. It should rather look like this:
Gamespel: Please show me how you modified it exactly. I'm afraid you made a typing mistake there, hence the error.
Regards,
Garvin
Code: Select all
<img src="templates/leaf/img/logo.png" alt="Logo" />
Code: Select all
<img src="/templates/leaf/img/logo.png" alt="Logo" />
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Okay, please try to add an "exit;" after the include line:
That should do the trick?
Regards,
Garvin
Code: Select all
include_once(S9Y_INCLUDE_PATH . 'errordoc/404.html');
exit;
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/