Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 9:21 am (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 16 posts ] 
Author Message
Posted: Mon Nov 12, 2007 9:11 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 12, 2007 8:55 pm
Posts: 7
Hi, Im going slightly insane trying to get SEO to work

I am hosting my site in a test environment on my machine set up using xampp

Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.4

My site url is http://localhost/aquasoftware/

Its local dir is G:\xampp\htdocs\AquaSoftware

I have enabled SEO in the global config, copied and renamed the htaccess.txt file to .htaccess (i have both .htaccess and htaccess.txt in my joomla dir, does that matter?)

I have read the notes in .htaccess and attempted to set them correctly, but when i uncomment anything I get an error 500 anywhere on the site including the administration section.

"Server error! Error 500

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script."


So with everything commented and using the .htaccess below, I can then view the frontpage and admin section. From the frontpage the links are SEO

e.g. http://localhost/aquasoftware/content/view/8/45/

But every link just gives a 404 error.

Please please help I am truly stuck.

I do have a folder called components in G:\xampp\htdocs\AquaSoftware (but wouldnt everyone)?
I dont have one called content.

Thanks in advance

Adam



##
# @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
Posted: Mon Nov 12, 2007 9:45 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Sun Oct 02, 2005 12:50 am
Posts: 12377
Location: Omaha, NE
Since it is your server, did you enable mod_rewrite?

_________________
Regards, Dave Global Moderator
Your question has likely already been answered - Search the forums & the documentation wiki first - and only then post your question!
http://www.kiwaniswest.org
http://www.faysgifts.com


Top
  E-mail  
 
Posted: Mon Nov 12, 2007 10:01 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 12, 2007 8:55 pm
Posts: 7
Hi,

Well i have tried,

I did this:

Enable mod_rewrite

  1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)
  2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)
  3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.

but still get error 500 when uncommenting anything in the .htaccess file :(

Any ideas?

thanks


Top
  E-mail  
 
Posted: Mon Nov 12, 2007 11:18 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Sun Oct 02, 2005 12:50 am
Posts: 12377
Location: Omaha, NE
After you did that with httpd.conf, did you restart apache?

_________________
Regards, Dave Global Moderator
Your question has likely already been answered - Search the forums & the documentation wiki first - and only then post your question!
http://www.kiwaniswest.org
http://www.faysgifts.com


Top
  E-mail  
 
Posted: Mon Nov 12, 2007 11:31 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 12, 2007 8:55 pm
Posts: 7
I hadn't, I have now, still error 404, but i have been able to uncomment

Options +FollowSymLinks

without causing error 500.

I appreciate your help, any more?

thanks


Top
  E-mail  
 
Posted: Tue Nov 13, 2007 2:19 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 12, 2007 8:55 pm
Posts: 7
Actually, when i went to enable mod_rewrite

I couldnt do step 3

  3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.

These lines dont exist, all i could do is uncomment rewrite_module modules/mod_rewrite.so

Thanks


Top
  E-mail  
 
Posted: Tue Nov 13, 2007 4:15 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 2:09 am
Posts: 2819
Location: California
Everything in the above .htaccess file is commented-out, so nothing is enabled.

Use the standard Joomla htaccess file.

_________________

██ AllVideos Reloaded extension Help forum

http://joomlacode.org/gf/project/allvideos15/forum/?action=ForumBrowse&forum_id=7581


Top
   
 
Posted: Tue Nov 13, 2007 4:53 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 12, 2007 8:55 pm
Posts: 7
I have, that is it (i copied the htaccess.txt file in the dos promtp to .htaccess), but the only way i can stop error 500 on all pages seems to be to comment out everything, then i can view the front page and admin section, but all front pages link to 404 erros.


Top
  E-mail  
 
Posted: Tue Nov 13, 2007 8:44 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 2:09 am
Posts: 2819
Location: California
XAMPP does not come configured with mod_rewrite.
You have to enable mod_rewrite.
[quote="kenmcd"]Apache requirements for mod_rewrite to work
The Apache httpd.conf file has the settings to enable URL rewriting.
Two settings are required.
1. mod_rewrite module is installed
Search file for LoadModule rewrite_module and un-comment that line (remove the leading #)
2. AllowOverride All
Search file for AllowOverride None and change it to AllowOverride All
3. Restart Apache
Restarting the Apache web server is required for the changes to take effect.
[/quote]

Depending on where you installed XAMPP the file will be in the Apache directory.
Such as:  C:\xampp\apache\conf\httpd.conf

Make sure you restart Apache.

Then put back the proper .htaccess file.
Should work then.

_________________

██ AllVideos Reloaded extension Help forum

http://joomlacode.org/gf/project/allvideos15/forum/?action=ForumBrowse&forum_id=7581


Top
   
 
Posted: Tue Nov 13, 2007 8:50 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 12, 2007 8:55 pm
Posts: 7
:):):) thanks so much, I changed the

AllowOverride None

to

AllowOverride all

Restarted

copied the htaccess.txt back into .htaccess

uncommented 

RewriteEngine On

and it works!!

Thanks again.


Top
  E-mail  
 
Posted: Wed Nov 21, 2007 5:09 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Jan 06, 2006 6:41 am
Posts: 143
renton84uk wrote:
:):):) thanks so much, I changed the

AllowOverride None

to

AllowOverride all

Restarted

copied the htaccess.txt back into .htaccess

uncommented 

RewriteEngine On

and it works!!

Thanks again.


how did you do this? I seem to be having the same problem and would like to try your method.


Top
  E-mail  
 
Posted: Thu Nov 22, 2007 12:57 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 12, 2007 8:55 pm
Posts: 7
its all explained in the above post...


Top
  E-mail  
 
Posted: Fri Nov 23, 2007 1:22 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Jan 06, 2006 6:41 am
Posts: 143
ok... I wanted to know where you found the files but it's alright. I solved my SEO problem already.


Top
  E-mail  
 
Posted: Thu Dec 20, 2007 3:50 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Oct 03, 2007 10:39 pm
Posts: 117
Ok I've spent a good hour trying to get this to work and yet I am unable to.

I have all the settings as described above:

LoadModule rewrite_module modules/mod_rewrite.so
AllowOverride all
RewriteEngine On (Basic .htaccess file without any changes)

However, I'm still getting the 404 NOT FOUND  localhost/joomla/content/view/27/60/ was not found on this server.

Any help would be greatly appreciated.

Code:
##
# @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

_________________
I know it's better to teach a man to fish...but if that man is starving, he'll die before he catches a fish. So do him a favor, feed him first...then teach him to fish.


Top
  E-mail  
 
Posted: Thu Dec 20, 2007 4:07 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 2:09 am
Posts: 2819
Location: California
1. Did you restart Apache?
This is required for the httpd.conf file changes to take effect.

2. Have you tested if mod_rewrite is actually working?
Do that first.
If mod_rewrite is not working nothing else matters.

3. Looks like you have Joomla 1.0.xx installed in a sub-directory.
# RewriteBase /
should be
RewriteBase /joomla

_________________

██ AllVideos Reloaded extension Help forum

http://joomlacode.org/gf/project/allvideos15/forum/?action=ForumBrowse&forum_id=7581


Top
   
 
Posted: Thu Dec 20, 2007 4:38 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Oct 03, 2007 10:39 pm
Posts: 117
Thanks for the help.

Yes, I've restarted Apache for each change.
I've reset the RewriteBase to
RewriteBase/joomla

How can you tell/test to see if  mod_rewrite is actually working?
(Sorry I'm a noob but it looks as if this is the issue)

I'm using WAMP...

Thanks again.

_________________
I know it's better to teach a man to fish...but if that man is starving, he'll die before he catches a fish. So do him a favor, feed him first...then teach him to fish.


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group