Solved - 404 error when using Search Engine Friendly URLs

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
Vloemie83
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 11, 2018 7:02 pm

Solved - 404 error when using Search Engine Friendly URLs

Post by Vloemie83 » Sun Mar 11, 2018 7:47 pm

I've installed Joomla 3.8.5 without sample data for my website.

Using the administrator tool, I've created an Article named 'contact'.
Next I've added a new Menu item which points to the Article.

When I visit my website, I can see the newly created menu. But when I click on it, I get a "ERROR 404 - not found!" page.
When I turn off Search Engine Friendly URL in the Global Configuration, then the contact page is loaded OK.

Am I doing something wrong ???
Last edited by imanickam on Fri Mar 16, 2018 4:44 am, edited 1 time in total.
Reason: Marked the topic as Solved

 
gws
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4122
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: 404 error when using Search Engine Friendly URLs

Post by gws » Sun Mar 11, 2018 8:12 pm

Did you rename htacces.txt to .htaccess?

Vloemie83
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 11, 2018 7:02 pm

Re: 404 error when using Search Engine Friendly URLs

Post by Vloemie83 » Sun Mar 11, 2018 9:40 pm

I did not. But I only see a .htaccess file in the root directory, no htaccess.txt file. So I assume this was done automatically?

gws
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4122
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: 404 error when using Search Engine Friendly URLs

Post by gws » Mon Mar 12, 2018 7:17 am

Well it is not done automatically when you install joomla,suggest that you compare it with the joomla default one.

Vloemie83
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 11, 2018 7:02 pm

Re: 404 error when using Search Engine Friendly URLs

Post by Vloemie83 » Mon Mar 12, 2018 7:23 pm

I've uninstalled Joomla and started from scratch again. There was no .htaccess file any more.
After the installation of Joomla (using Installatron) I've checked the root directory and again there is a .htaccess file, no htaccess.txt file. Is this some kind of default file provided by the hosting company then?

The .htaccess file looks like this:

Code: Select all

##
# @package    Joomla
# @copyright  Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of mod_rewrite, but it may have already been set by your 
# server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the 
# beginning of the line), reload your site in your browser and test your sef urls. If 
# they work, then it has been set by your server administrator and you do not need to 
# set it here.
##

## No directory listings
<IfModule autoindex>
  IndexIgnore *
</IfModule>

## Can be commented out if causes errors, see notes above.
#Options +FollowSymlinks
#Options -Indexes

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed 
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
Problem still persists. The menu items are not working when I choose to use the default option Search Engine Friendly URLs.

gws
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4122
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: 404 error when using Search Engine Friendly URLs

Post by gws » Mon Mar 12, 2018 7:49 pm

Install joomla manually,those automatic scripts are problematic.
see https://docs.joomla.org/J3.x:Installing_Joomla

Vloemie83
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 11, 2018 7:02 pm

Re: 404 error when using Search Engine Friendly URLs

Post by Vloemie83 » Wed Mar 14, 2018 9:37 pm

I've just installed Joomla manually. The problem persists.

I've copied the .htaccess file from another website I created some time ago at the same hosting company. Still no success. :(

gws
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4122
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: 404 error when using Search Engine Friendly URLs

Post by gws » Thu Mar 15, 2018 9:59 am

I suggest that you use the htaccess.txt file that came with the installation and rename it to .htaccess. Then at the top of the forum in pink there is the FPA (Forum Post Assistant) and post the results here so we can see what is going on.

Vloemie83
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 11, 2018 7:02 pm

Re: 404 error when using Search Engine Friendly URLs

Post by Vloemie83 » Thu Mar 15, 2018 6:55 pm

Forum Post Assistant (v1.3.9) : 15th March 2018 wrote:
Basic Environment :: wrote:Joomla! Instance :: Joomla! 3.8.6-Stable (Amani) 13-March-2018
Joomla! Platform :: Joomla Platform 13.1.0-Stable (Curiosity) 24-Apr-2013
Joomla! Configured :: Yes | Read-Only (444) | Owner: --protected-- . (uid: 1/gid: 1) | Group: --protected-- (gid: 1) | Valid For: 3.8
Configuration Options :: Offline: 0 | SEF: 1 | SEF Suffix: 0 | SEF ReWrite: 0 | .htaccess/web.config: Yes | GZip: 0 | Cache: 0 | CacheTime: 15 | CacheHandler: file | CachePlatformPrefix: 0 | FTP Layer: 0 | Proxy: 0 | LiveSite: | Session lifetime: 15 | Session handler: database | Shared sessions: 0 | SSL: 0 | FrontEdit: 1 | Error Reporting: default | Site Debug: 0 | Language Debug: 0 | Default Access: 1 | Unicode Slugs: 0 | dbConnection Type: mysqli | Database Credentials Present: Yes

Host Configuration :: OS: Linux | OS Version: 3.10.0-693.17.1.el7.x86_64 | Technology: x86_64 | Web Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.5.35 mod_python/3.5.0- Python/2.7.5 | Encoding: gzip, deflate | Doc Root: --protected-- | System TMP Writable: Yes | Free Disk Space : 445.68 GiB |

PHP Configuration :: Version: 5.6.34 | PHP API: fpm-fcgi | Session Path Writable: Yes | Display Errors: | Error Reporting: 22517 | Log Errors To: | Last Known Error: | Register Globals: | Magic Quotes: | Safe Mode: | Open Base: | Uploads: 1 | Max. Upload Size: 30M | Max. POST Size: 30M | Max. Input Time: 60 | Max. Execution Time: 30 | Memory Limit: 512M

MySQL Configuration :: Version: 5.7.21 (Client:mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $) | Host: --protected-- (--protected--) | Collation: utf8_general_ci (Character Set: utf8) | Database Size: 3.94 MiB | #of Tables:  72
Detailed Environment :: wrote:PHP Extensions :: Core (5.6.34) | date (5.6.34) | ereg () | libxml () | openssl () | pcre () | sqlite3 (0.7-dev) | zlib (2.0) | bcmath () | bz2 () | calendar () | ctype () | curl () | dom (20031129) | hash (1.0) | fileinfo (1.0.5) | filter (0.11.0) | ftp () | gd () | gettext () | gmp () | SPL (0.2) | iconv () | session () | intl (1.1.0) | json (1.2.1) | ldap () | mbstring () | mcrypt () | standard (5.6.34) | mysql (1.0) | mysqlnd (mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $) | odbc (1.0) | pcntl () | mysqli (0.1) | PDO (1.0.4dev) | pdo_mysql (1.0.2) | pdo_sqlite (1.0.1) | Phar (2.0.2) | posix () | pspell () | Reflection ($Id: 5f15287237d5f78d75b19c26915aa7bd83dee8b8 $) | imap () | shmop () | SimpleXML (0.1) | snmp (0.1) | soap () | sockets () | exif (1.4 $Id: 1c8772f76be691b7b3f77ca31eb788a2abbcefe5 $) | sysvmsg () | sysvsem () | sysvshm () | tokenizer (0.1) | wddx () | xml () | xmlreader (0.1) | xmlrpc (0.51) | xmlwriter (0.1) | xsl (0.1) | zip (1.12.5) | cgi-fcgi () | imagick (3.4.1) | memcache (2.2.7) | suhosin (0.9.38) | ionCube Loader () | Zend OPcache (7.0.6-devFE) | Zend Engine (2.6.0) |
Potential Missing Extensions ::

Switch User Environment (Experimental) :: PHP CGI: No | Server SU: No | PHP SU: No | Custom SU (LiteSpeed/Cloud/Grid): Yes
Potential Ownership Issues: No
Folder Permissions :: wrote:Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (---) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) | administrator/logs/ (755) |

Elevated Permissions (First 10) ::
Database Information :: wrote:Database statistics :: Uptime: 2602098 | Threads: 1 | Questions: 36805971 | Slow queries: 0 | Opens: 1960215 | Flush tables: 1 | Open tables: 2000 | Queries per second avg: 14.144 |
Extensions Discovered :: wrote:Components :: SITE :: com_mailto (3.0.0) 1 | com_wrapper (3.0.0) 1 |
Components :: ADMIN :: com_admin (3.0.0) 1 | com_ajax (3.2.0) 1 | com_associations (3.7.0) 1 | com_banners (3.0.0) 1 | com_cache (3.0.0) 1 | com_categories (3.0.0) 1 | com_checkin (3.0.0) 1 | com_config (3.0.0) 1 | com_content (3.0.0) 1 | com_contenthistory (3.2.0) 1 | com_cpanel (3.0.0) 1 | com_fields (3.7.0) 1 | com_finder (3.0.0) 1 | com_installer (3.0.0) 1 | com_joomlaupdate (3.6.2) 1 | com_languages (3.0.0) 1 | com_login (3.0.0) 1 | com_media (3.0.0) 1 | com_menus (3.0.0) 1 | com_messages (3.0.0) 1 | com_modules (3.0.0) 1 | com_newsfeeds (3.0.0) 1 | com_plugins (3.0.0) 1 | com_postinstall (3.2.0) 1 | com_redirect (3.0.0) 1 | com_search (3.0.0) 1 | com_tags (3.1.0) 1 | com_templates (3.0.0) 1 | com_users (3.0.0) 1 |

Modules :: SITE :: mod_articles_archive (3.0.0) 1 | mod_articles_categories (3.0.0) 1 | mod_articles_category (3.0.0) 1 | mod_articles_latest (3.0.0) 1 | mod_articles_news (3.0.0) 1 | mod_articles_popular (3.0.0) 1 | mod_banners (3.0.0) 1 | mod_breadcrumbs (3.0.0) 1 | mod_custom (3.0.0) 1 | mod_feed (3.0.0) 1 | mod_finder (3.0.0) 1 | mod_footer (3.0.0) 1 | mod_languages (3.5.0) 1 | mod_login (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_random_image (3.0.0) 1 | mod_related_items (3.0.0) 1 | mod_search (3.0.0) 1 | mod_stats (3.0.0) 1 | mod_syndicate (3.0.0) 1 | mod_tags_popular (3.1.0) 1 | mod_tags_similar (3.1.0) 1 | mod_users_latest (3.0.0) 1 | mod_whosonline (3.0.0) 1 | mod_wrapper (3.0.0) 1 |
Modules :: ADMIN :: mod_custom (3.0.0) 1 | mod_feed (3.0.0) 1 | mod_latest (3.0.0) 1 | mod_logged (3.0.0) 1 | mod_login (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_multilangstatus (3.0.0) 1 | mod_popular (3.0.0) 1 | mod_quickicon (3.0.0) 1 | mod_sampledata (3.8.0) 1 | mod_stats_admin (3.0.0) 1 | mod_status (3.0.0) 1 | mod_submenu (3.0.0) 1 | mod_title (3.0.0) 1 | mod_toolbar (3.0.0) 1 | mod_version (3.0.0) 1 |

Plugins :: SITE :: plg_authentication_cookie (3.0.0) 1 | plg_authentication_gmail (3.0.0) 0 | plg_authentication_joomla (3.0.0) 1 | plg_authentication_ldap (3.0.0) 0 | plg_captcha_recaptcha (3.4.0) 0 | plg_content_emailcloak (3.0.0) 1 | plg_content_fields (3.7.0) 1 | plg_content_finder (3.0.0) 0 | plg_content_joomla (3.0.0) 1 | plg_content_loadmodule (3.0.0) 1 | plg_content_pagebreak (3.0.0) 1 | plg_content_pagenavigation (3.0.0) 1 | plg_content_vote (3.0.0) 0 | plg_editors_codemirror (5.34.0) 1 | plg_editors_tinymce (4.5.8) 1 | plg_editors-xtd_article (3.0.0) 1 | plg_editors-xtd_fields (3.7.0) 1 | plg_editors-xtd_image (3.0.0) 1 | plg_editors-xtd_menu (3.7.0) 1 | plg_editors-xtd_module (3.5.0) 1 | plg_editors-xtd_pagebreak (3.0.0) 1 | plg_editors-xtd_readmore (3.0.0) 1 | plg_extension_joomla (3.0.0) 1 | plg_fields_calendar (3.7.0) 1 | plg_fields_checkboxes (3.7.0) 1 | plg_fields_color (3.7.0) 1 | plg_fields_editor (3.7.0) 1 | plg_fields_imagelist (3.7.0) 1 | plg_fields_integer (3.7.0) 1 | plg_fields_list (3.7.0) 1 | plg_fields_media (3.7.0) 1 | plg_fields_radio (3.7.0) 1 | plg_fields_sql (3.7.0) 1 | plg_fields_text (3.7.0) 1 | plg_fields_textarea (3.7.0) 1 | plg_fields_url (3.7.0) 1 | plg_fields_user (3.7.0) 1 | plg_fields_usergrouplist (3.7.0) 1 | plg_finder_categories (3.0.0) 1 | plg_finder_contacts (3.0.0) 1 | plg_finder_content (3.0.0) 1 | plg_finder_newsfeeds (3.0.0) 1 | plg_finder_tags (3.0.0) 1 | PLG_INSTALLER_FOLDERINSTALLER (3.6.0) 1 | plg_installer_packageinstaller (3.6.0) 1 | PLG_INSTALLER_URLINSTALLER (3.6.0) 1 | plg_quickicon_extensionupdate (3.0.0) 1 | plg_quickicon_joomlaupdate (3.0.0) 1 | plg_quickicon_phpversioncheck (3.7.0) 1 | plg_search_categories (3.0.0) 1 | plg_search_contacts (3.0.0) 1 | plg_search_content (3.0.0) 1 | plg_search_newsfeeds (3.0.0) 1 | plg_search_tags (3.0.0) 1 | plg_system_cache (3.0.0) 0 | plg_system_debug (3.0.0) 1 | plg_system_fields (3.7.0) 1 | plg_system_highlight (3.0.0) 1 | plg_system_languagecode (3.0.0) 0 | plg_system_languagefilter (3.0.0) 0 | plg_system_log (3.0.0) 1 | plg_system_logout (3.0.0) 1 | plg_system_p3p (3.0.0) 0 | plg_system_redirect (3.0.0) 0 | plg_system_remember (3.0.0) 1 | plg_system_sef (3.0.0) 1 | plg_system_sessiongc (3.8.6) 1 | plg_system_stats (3.5.0) 1 | plg_system_updatenotification (3.5.0) 1 | plg_twofactorauth_totp (3.2.0) 0 | plg_twofactorauth_yubikey (3.2.0) 0 | plg_user_contactcreator (3.0.0) 0 | plg_user_joomla (3.0.0) 1 | plg_user_profile (3.0.0) 0 |
Templates Discovered :: wrote:Templates :: SITE :: beez3 (3.1.0) 1 | protostar (1.0) 1 |
Templates :: ADMIN :: hathor (3.0.0) 1 | isis (1.0) 1 |

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 14940
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: 404 error when using Search Engine Friendly URLs

Post by mandville » Thu Mar 15, 2018 9:41 pm

SEF ReWrite: 0 should be YES

and update your php
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

Vloemie83
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 11, 2018 7:02 pm

Re: 404 error when using Search Engine Friendly URLs

Post by Vloemie83 » Thu Mar 15, 2018 10:04 pm

mandville wrote:SEF ReWrite: 0 should be YES
On my other website it was also working without SEF ReWrite. With "index.php" in the URL then.
But with SEF ReWrite = Yes it seems to be working on the new site too now.
Thank you both! :)

 

Locked

Return to “General Questions/New to Joomla! 3.x”