nsForum logo

Welcome Guest ( Log In )

 
Reply to this topicStart new topic
> Joomla And Small Unix Question, Can I use the SEF feature in Joomla on a small Unix System
joeylowe
post Apr 21 2010, 09:33 PM
Post #1





Group: Verified NS Member
Posts: 3
Joined: 21-April 10
Member No.: 9,288



Hi! Every time I turn on the SEF feature (Search Engine Friendly) in Joomla, I lose my site and get a bunch of gibberish. Inside Joomla, I'm told I have to rename my htaccess.txt file and make sure that the Apache server is set for rewrites. There are explicit instructions on how to do this, but I'm hesitant since I don't know if the Small Unix Hosting uses Apache Servers or IIS servers. Can someone shed some light on how to make this work?

All I want to do is to be able to use search engine friendly urls with the Joomla CMS instead of the Joomla default url (itemXX.php)
Go to the top of the page
 
+Quote Post
EngineerMonster
post Apr 22 2010, 07:42 AM
Post #2





Group: Root Admin
Posts: 1,401
Joined: 10-August 07
From: St. Louis, MO
Member No.: 4



Hi joeylowe,

Our unix hosting uses apache and yes you can use search engine friendly urls, you just need to setup your .htaccess file properly. Mod rewrite is installed on all of our unix hosting packages.
Go to the top of the page
 
+Quote Post
joeylowe
post Apr 22 2010, 10:56 AM
Post #3





Group: Verified NS Member
Posts: 3
Joined: 21-April 10
Member No.: 9,288



Thanks Joseph! I'm about to give it a whirl. I'm sure I will be back...
QUOTE (EngineerMonster @ Apr 22 2010, 08:42 AM) *
Hi joeylowe,

Our unix hosting uses apache and yes you can use search engine friendly urls, you just need to setup your .htaccess file properly. Mod rewrite is installed on all of our unix hosting packages.

Go to the top of the page
 
+Quote Post
joeylowe
post Apr 22 2010, 11:12 AM
Post #4





Group: Verified NS Member
Posts: 3
Joined: 21-April 10
Member No.: 9,288



Ok, I'm back. I opened the .htaccess file and added the line RewriteBase /joomla1 which is per the document instruction in the Joomla Docs. When I did this, I lost the site with an Access Forbidden Page. The docs also call for me to:

Make sure that Mod_rewrite is working. Check that the line shown below in the file "apache/conf/httpd.conf" is uncommented. If necessary, uncomment the line and re-start the Apache web server.

LoadModule rewrite_module modules/mod_rewrite.so

I have no idea how to do that and I assume that is something ya'll handle?

So what am I missing or doing wrong?

Thanks!
Joey
Go to the top of the page
 
+Quote Post
EngineerMonster
post Apr 22 2010, 11:50 AM
Post #5





Group: Root Admin
Posts: 1,401
Joined: 10-August 07
From: St. Louis, MO
Member No.: 4



Your .htaccess file is going to need a lot of stuff in it not just the base. So if for example your site was installed into the /joomla directory, then your htaccess would look like -

CODE
##
# @version $Id: htaccess.txt 13415 2009-11-03 15:53:25Z ian $
# @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.
#
#####################################################

##  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!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
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 /joomla


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


You also then have to turn on in the configuration section of joomla to use mod rewrite.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
Tags
No Tag inserted yet

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version    Network Solutions © 2011 Time is now: 23rd October 2017 - 06:19 AM
Domain Names | Web Hosting | Web Design | Shopping Cart Software | Online Marketing | SSL Certificates