Top Menu does not work with sh404sef or Joomla SEO

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
zorab
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Fri Aug 08, 2008 1:37 pm
Contact:

Top Menu does not work with sh404sef or Joomla SEO

Post by zorab » Thu Sep 11, 2008 12:29 pm

Hi,

I have problem with top menu when using SEO enable and/or sh404sef. Menu links lead to Not Found page. When I turn off Joomla SEO and sh404sef, all work ok.

I am using Joomla 1.5.7 on localhost for the moment.

You can check the template here http://www.shape5.com/demo/index.php#
Template is February - Forever ACE

Please help me to figure out this issue.

Thanks

zorab
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Fri Aug 08, 2008 1:37 pm
Contact:

Re: Top Menu does not work with sh404sef or Joomla SEO

Post by zorab » Fri Sep 12, 2008 9:24 am

So let me be a lil more specific

With SEO on it shows http://localhost/Joomla!-License-Guidelines but leads to 404

With SEO off it shows http://localhost/1/index.php?option=com ... 5&Itemid=2
and the page it shows ok

GameDaddy
Joomla! Guru
Joomla! Guru
Posts: 725
Joined: Sun Aug 24, 2008 4:35 pm

Re: Top Menu does not work with sh404sef or Joomla SEO

Post by GameDaddy » Fri Sep 12, 2008 1:51 pm

You'll need to configure your apache server to use php 5 by renaming the htaccess.txt to .htaccess

Yes, that's (dot)htaccess

In addition, you'll need to add the following two lines of code to the htaccess file:

AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4


and make sure the Rewrite Engine is turned on by uncommenting it, if it is commented with a hash in your install. Here's what my htaccess file looks like. Note: php_flag register_globals are not set here, My host has already configured that for me:

Code: Select all

##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


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

# PHP Handling Update 8-21-08 GameDaddy (per Joomla forums)

AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4

# PHP Global Registers turned off -- per Joomla 1.5 Install Manual
# php_flag register_globals Off 

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment 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
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
Try this and see if that fixes your SEO woes.

questbg
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Aug 16, 2008 8:02 am
Location: Kotel, Bulgaria
Contact:

Re: Top Menu does not work with sh404sef or Joomla SEO

Post by questbg » Wed Sep 17, 2008 5:38 am

Hi GameDaddy
GameDaddy wrote: Try this and see if that fixes your SEO woes.
I added the code to my .htaccess file (mine was already running php5 with Rewrite Engine on), backed up the original and uploaded the new version.

Reloaded the site and got the following message:
"You have chosen to open http://www.mytestsite.com which is
a: application/x-httpd-php
from: http://mytestsite.com

What should Firefox do with this file?"

So I had to revert to previous version of the .htaccess files.

Like the users above, everything on my site was working fine until I upgraded to 1.5.7, now, if I activate "Search Engine Friendly URL's" in global admin, I get 404 errors on most of the pages.

Thanks
Chris

suavemart
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed Mar 01, 2006 11:26 am

Re: Top Menu does not work with sh404sef or Joomla SEO

Post by suavemart » Tue Sep 30, 2008 10:38 pm

I got the same problem - anyone manage to solve it?

questbg
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Aug 16, 2008 8:02 am
Location: Kotel, Bulgaria
Contact:

Re: Top Menu does not work with sh404sef or Joomla SEO

Post by questbg » Wed Oct 01, 2008 4:57 am

suavemart wrote:I got the same problem - anyone manage to solve it?
In my case it was a Firefox issue, I checked the site with Safari and Opera and no problem. In the end I cleared all the Firefox cache and it was fine?


Locked

Return to “Templates for Joomla! 1.5”