Page 1 of 2

SEF URL's Not working

Posted: Tue Apr 04, 2006 10:16 pm
by jbassil
Hi - I tried to enable the "Search Engine Friendly URL's" option on my Joomla site and content item links are not working, however component item links are. Any ideas? I get a resource not found error when a content menu item is selected similar to:
'An appropriate representation of the requested resource /content/view/13/26/ could not be found on this server.'

Some insight would be much appreciated.

thx

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 2:16 am
by nibra
You must rename the file htaccess.txt to .htaccess in order to make SEF work.

Regards
Niels

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 3:10 am
by icare
jbassil wrote: Hi - I tried to enable the "Search Engine Friendly URL's" option on my Joomla site and content item links are not working, however component item links are. Any ideas? I get a resource not found error when a content menu item is selected similar to:
'An appropriate representation of the requested resource /content/view/13/26/ could not be found on this server.'

Some insight would be much appreciated.

thx
Use search button buddy... you will find a post by me asking same solution and probably an answer to it too....

Anyway you may need to to modify your .htaccess file

Please post your .htaccess file here and somebody should be able to help you

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 1:21 pm
by jbassil
Ok - I have faced this problem a couple of weeks ago and tried a lot of variations in the .htaccess file, and still nothing worked. I have included the file below for your review....thanks.

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

#
#  mod_rewrite in use

RewriteEngine On


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

RewriteBase /


########## Begin Standard SEF Section
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section


########## Begin 3rd Party or Core SEF Section
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule (.*) index.php
#
########## End 3rd Party or Core SEF Section

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 1:44 pm
by nibra
For me this works fine:

Code: Select all

##
# @version $Id: htaccess.txt 1570 2005-12-29 05:53:33Z eddieajau $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##

Options +FollowSymLinks

#
# Turn on PHP5
#

AddType x-mapp-php5 .php

#
#  mod_rewrite in use
#

RewriteEngine On

##
## NOTE!
## When using multiple Joomla sites or other web applications in sub-folders,
## you must explicitly turn the RewriteEngine off or use the settings
## recommended for the application
##

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

RewriteBase /

#
#  Rules
#

RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
Regards
Niels

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 1:47 pm
by jbassil
Is this an original .htaccess file? Meaning, did it come with a realease of Joomla or did you have to tweak it to work properly?

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 1:53 pm
by jbassil
FYI...I tried the suggested .htaccess file, and could not login to my admin panel. A pop-up continually appeared asking me to "please enter password". The page in the background showed some php code posting form variables and submitting them...not sure what happened.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 2:02 pm
by nathandiehl
jbassil,
the file posted by nibra is from 1.0.7 or ealier. NOT RECOMMENDED to use that file.

1. are you on a linux server that has mod_rewrite enabled?
2. try these edits:


please try to edit your file as follows:
##  Can be commented out if causes errors, see notes above.
Options FollowSymLinks

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



if that doesn't work, try
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d

to
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

both with and without first suggestion commented out.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 2:26 pm
by jbassil
Hi Nathan,

I tried all variations of the below suggestions and still getting the same error.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 5:36 pm
by nibra
jbassil wrote: Is this an original .htaccess file? Meaning, did it come with a realease of Joomla or did you have to tweak it to work properly?
It is from 1.0.7. The only change I made is to add PHP5 support.

Regards
Niels

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 5:42 pm
by nathandiehl
jbassil,
please provide me with a link and directions to duplicate this error. i would like to look at it.

nibra,
yes, it is NOT recommended to run an outdated version of Joomla! please upgrade to the most current version.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 5:54 pm
by nibra
nathandiehl wrote: yes, it is NOT recommended to run an outdated version of Joomla! please upgrade to the most current version.
I know that, but the mentioned installation has too many core patches to make an unpaid upgrade (but it is the only one, I use with SEF). Thank you for your concern  ;)

Regards
Niels

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 6:53 pm
by nathandiehl
jbassil,
please try clearing your system cache. let me know. i have seen this before, and that is the suggestion i made before, and never heard back. please let us know if that helps.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 6:55 pm
by jbassil
Sorry for my ignorance, but are you referring to the browser cache? Thanks.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 6:57 pm
by nathandiehl
no, the joomla! cache.

from the backend, go to system-->clean all caches
(if the option isn't there, that means chache isn't enabled, and i'll keep looking for the solution)

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 7:05 pm
by jbassil
That option is not there.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 7:36 pm
by nathandiehl
is safe mode on? what version of php?
if you don't know the answer, please post the contents of this: from the backend, system-->system info (you only need to post all info through but not including your configuraption.php file)

thanks.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 7:45 pm
by jbassil
Safe Mode is OFF
PHP 4.3.11

I'll include the other info for you as well:

Database Version:  4.0.25-standard 
PHP Version:  4.3.11 
Web Server:  Apache/1.3.34 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a 
WebServer to PHP interface:  apache 
Joomla! Version:  Joomla! 1.0.8 Stable [ Sunshade ] 26-Feb-2006 05:00 UTC 
User Agent:  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) 
Relevant PHP Settings:  Safe Mode:  OFF 
Open basedir:  none 
Display Errors:  ON 
Short Open Tags:  ON 
File Uploads:  ON 
Magic Quotes:  ON 
Register Globals:  OFF 
Output Buffering:  OFF 
Session save path:  /tmp 
Session auto start:  0 
XML enabled:  Yes 
Zlib enabled:  Yes 
Disabled Functions:  none 
WYSIWYG Editor:  No WYSIWYG Editor 

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 7:52 pm
by nathandiehl
well...

here is what we know:
yoursite.com/content/view/13/26/

doesn't work. but:
yoursite.com/content/view/13/26

does work.

can you please try this:
in configuration.php, change $mosConfig_livesite from 'yoursite.com' to 'www.yoursite.com' and see if that does it?

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 8:03 pm
by jbassil
I tried this change while making all the requested changes with the .htaccess file as mentioned before and still no luck.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 8:15 pm
by nathandiehl
please try to unpublish the mossef mambot.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 8:39 pm
by jbassil
Ok - I did that. The issue still exists.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 8:46 pm
by nathandiehl
okay...this is my last idea (at least for the moment)

with sef enabled, try creating a new menu item pointing to the same thing as one of the menu items that doesn't work. does this new one work?

i'm still thinking on this one. i really thought the sef bot was it...

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 8:48 pm
by jbassil
Sorry, but i tried this just now and got the same http 406 error:
An appropriate representation of the requested resource /content/view/14/28/ could not be found on this server.

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 8:51 pm
by nathandiehl
okay...i think i finally found it.
http://forum.joomla.org/index.php/topic ... #msg123253

(i'm going for a run now, i'll check back in an hour or so when i'm back)

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 8:54 pm
by jbassil
Worked!

FYI...I added "SecFilterEngine Off" to my .htaccess file and now the built in SEF works great!

Thanks much!
Joe

Re: SEF URL's Not working

Posted: Wed Apr 05, 2006 9:54 pm
by nathandiehl
Joe,
sorry that took so long  :'(

Re: SEF URL's Not working

Posted: Thu Aug 30, 2007 8:10 am
by beachkitty85
For anyone freaking out because they still can't find a solution to this problem, here's my story.

I had Artio SEF URLs working perfectly, then every single page in my entire site starting throwing out 404's. The only change I made was to install Fireboard, but I disabled it and my website still wouldn't work. I read all I could find, including this thread, but nothing worked. I started randomly fiddling around with my .htaccess and found a solution.

I commented out these lines. I'm not sure of the consequences, but it fixed my site.

Code: Select all

########## 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

Re: SEF URL's Not working

Posted: Fri Mar 14, 2008 6:26 pm
by Prince413
Ok, I read through the topic and tried the things that other people have gotten success with, however, my site still isn't working.

This topic is fairly old so maybe the solutions have changed.

The following is my .htaccess file:

Code: Select all

##
# @version $Id: htaccess.txt 5975 2006-12-11 01:26:33Z robs $
# @package Joomla
# @copyright Copyright (C) 2005 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.
#
# Only use one of the two SEF sections that follow.  Lines that can be uncommented
# (and thus used) have only one #.  Lines with two #'s should not be uncommented
# In the section that you don't use, all lines should start with #
#
# For Standard SEF, use the standard SEF section.  You can comment out
# all of the RewriteCond lines and reduce your server's load if you
# don't have directories in your root named 'component' or 'content'
#
# If you are using a 3rd Party SEF or the Core SEF solution
# uncomment all of the lines in the '3rd Party or Core SEF' section
#
#####################################################

#####  SOLVING PROBLEMS WITH COMPONENT URL's that don't work #####
# SPECIAL NOTE FOR SMF USERS WHEN SMF IS INTEGRATED AND BRIDGED
# OR ANY SITUATION WHERE A COMPONENT's URL's AREN't WORKING
#
# In both the 'Standard SEF', and '3rd Party or Core SEF' sections the line:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# May need to be uncommented.  If you are running your Joomla!/Mambo from
# a subdirectory the name of the subdirectory will need to be inserted into this
# line.  For example, if your Joomla!/Mambo is in a subdirectory called '/test/',
# change this:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# to this:
# RewriteCond %{REQUEST_URI} ^(/test/component/option,com) [NC,OR] ##optional - see notes##
#
#####################################################


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

#
#  mod_rewrite in use

RewriteEngine On


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

# RewriteBase /


########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] 		##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section



########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] 		##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section



########## 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
What should I do?

Re: SEF URL's Not working

Posted: Sat Mar 15, 2008 11:00 am
by webvenue
prince have you found any solution?
i have the same problem but in my case everything was fine, im using Artio SEF. it worked fine for me but one day all sites on my server using joomla stopped working with SEF enabled. SEF using .htaccess seems to be working for another site on the same server that is not joomla based. that gives me a hint that webserver settings should b ok.

i have tried installing joomla 1.5 b ut with same results. core SEF does not work anymore for joomla 1.0.x or 1.5. my system info is as

PHP Built on: Linux infong 2.4 #1 SMP Wed Sep 26 00:19:50 CEST 2007 i686 GNU/Linux
Database Version: 4.0.27-standard
Database Collation: N/A (mySQL < 4.1.2)
PHP Version: 4.4.8
Web Server: Apache/1.3.34 Ben-SSL/1.55
Web Server to PHP interface: cgi
Joomla! Version: Joomla! 1.5.1 Production/Stable [ Seenu ] 8-February-2008 22:00 GMT

PHP settings:

Safe Mode: Off
Open basedir: None
Display Errors: On
Short Open Tags: On
File Uploads: On
Magic Quotes: On
Register Globals: On
Output Buffering: Off
Session Save Path: /tmp
Session Auto Start: 0
XML Enabled: Yes
Zlib Enabled: Yes
Disabled Functions: None
Mbstring Enabled: Yes
Iconv Available: Yes
WYSIWYG Editor: Editor - No Editor