Hello everyone,

I'm having trouble with Joomla non-existing category re-direct problem.

I cannot seem to find the proper rewrite url line for .htaccess file for the following problem.

I have my website http://www.dubrovnik.com

I'd like to send user to my 404 Page whenever user request for non-existing link.
I've managed to do it when, and it worked (IT IS DISABLED NOW ON PURPOSE) in the scenario where i type as url for example http://www.dubrovnik.com/some_misspelled_url.html,

but the problem comes when I have a sub folder or non-existing Joomla category in my url.

Example:
http://www.dubrovnik.com/city-life - this is a working category
but even when I set up the rule for the links, if I type http://www.dubrovnik.com/city-lifesdd23d2d32 (misspell something) it doesn't return me to my 404 page, but returns me to my index page with messed up css.

Please help!

Best regards,

Toni

Hello,

I'm guessing this error is fixed but it is mainly to do with Joomla rather than the HTaccess. What happens is that Joomla will look for similar categories to check that it's not misspelt.

However, with your first link you include a file type at the end (.html) which forces the web server to go to a direct location and bypass Joomla. As you don't have that page on your server you will receive the 404 error.

This could be redirected to a proper 404 page by using this command in your htaccess:

ErrorDocument 404 /404.php

Change the "/404.php" to your 404.php in the root.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.