Web Hosting Forum | Lunarpages
News: Server Migrations to San Diego: Deneb, Felix and Tsohea are moving to San Diego starting Tuesday, December 30, 2008 at 10pm Pacific. They will complete their moves Friday night, January 2, 2009

Isis, Seth and Ez-web-n-mail will move physically on Friday, January 2, 2009

Please see the forum posts at http://www.lunarforums.com/lunarpages_web_hosting_server_information-b54.0/

+ Submit Your Own Web Site for the January 2009 Site of the Month Contest!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 09, 2009, 02:29:04 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: LunarPages + Joomla + SEO = Doesn't seem to work.  (Read 222 times)
Zynn
Space Explorer
***
Offline Offline

Posts: 6


« on: August 17, 2008, 04:31:58 PM »

OK, I have tried this multiple times in multiple ways and I can't get the SEO function to work on Joomla 1.5 being hosted on LunarPages.
I'm not saying that it isn't possible.  I am saying that every tutorial I have followed hasn't worked.

I have tried installing the Latest version of Joomla 1.5, I have also tried with the version of Joomla 1.5 that you can install using Fantasico.

I changed the name of the htaccess.txt to .htaccess in the root directory of the Joomla install.
I also turned on SEO in Joomla's back-end, with and without " Use Apache mod_rewrite" checked.

I make sure to delete all cookies every time I make a change.

The only result I get is that yes, the URL gets converted to something that is "search-friendly".
Every page I click on , other than the home page, I get either the 404 not found error or I get my page scrambled up with no theme skin.


Please assist.
Logged
MrPhil
Quantum Encyclopedia Writer
*****
Online Online

Posts: 3578



« Reply #1 on: August 17, 2008, 04:57:58 PM »

If Joomla is showing "search-friendly" URLs, but they produce 404 errors, it means that your .htaccess file is wrong. Are you sure you have it in the right place? It has to be in a directory that all other Joomla references "go through". It can't be off to the side. It's correctly named (.htaccess)? It's readable (either 444 or 644 permissions)? It contains a section that claims to be rewriting Joomla URLs from static (search-friendly) to dynamic (blahblah.php?var=value)? If all this seems OK, please attach your .htaccess file here (after removing any sensitive information), and tell us exactly where it lives. Maybe there's a mismatch in the URL patterns it's translating, and where you actually put Joomla (e.g., it's set up for Joomla in your site root, while you have it one directory down).
Logged

Zynn
Space Explorer
***
Offline Offline

Posts: 6


« Reply #2 on: August 17, 2008, 05:21:34 PM »

Hello, MrPhil, and thank you for replying.


The .htaccess file is labeled correctly and has the permissions set to 644.

The .htaccess file is located in my Joomla install directory folder.        www.mydomain.com/joomlaDirectory

Below is a cut/paste of what is in the .htaccess file.  It is the default from when you install Joomla.

Am I supposed to change something there or do I need to contact LunarPages to activate the htaccess, Apache, or something?

---------------------------------------------------

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

##  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
« Last Edit: August 17, 2008, 05:25:42 PM by Zynn » Logged
MrPhil
Quantum Encyclopedia Writer
*****
Online Online

Posts: 3578



« Reply #3 on: August 17, 2008, 08:34:12 PM »

Three questions:

1) is "joomlaDirectory" (whatever its actual name is) where Joomla's index.php is? That is, would you run Joomla by typing in a URL of www.mydomain.com/joomlaDirectory, as opposed to www.mydomain.com? The idea is that .htaccess must reside in a directory (such as public_html/) that all uses of Joomla must pass through.

2) is mydomain.com  your primary domain (at public_html/), or is it an add-on domain? If an add-on, did you put .htaccess in the add-on's own root (public_html/mydomain/)?

3) I'm not familiar with the .htaccess provided by Joomla, but the 'core SEF' section looks a little odd. It redirects a bunch of stuff to just index.php, and not index.php?var=$1 style? The usual idea with 'Search Engine Friendly' URL rewriting is to take a bunch of directory names and reforge them into a series of var=values in a URL Query String. I don't see any of that, and am wondering if this is the original file that Joomla provided. Maybe someone who has a Joomla installation can chime in with whether this is correct.
Logged

Zynn
Space Explorer
***
Offline Offline

Posts: 6


« Reply #4 on: August 18, 2008, 12:41:57 AM »

Hello again, MrPhil.


The way I have my webspace set up is the following.

I have a domain name www.mydomain.com

I like to experiment with different forum packages and such to toy around with making skins and such.
I give each installation of of a forum package or Joomla CMS its own folder.
One site can be www.mydomain.com/PHPBBforum
Another site would be www.mydomain.com/myJoomlaSite
and so on.

So yes, in my public_html folder I would put the other folders containt different installs of whatever I have going on.

This means that each different installation of a forum or Joomla package will have its respective index.php file within the fold that it resides in, not the main root directory of www.mydomain.com

This is what you would see...  www.mydomain.com/myJoomlaSite/index.php   or  www.mydomain.com/PHPBBforum/index.php depending on which site you wanted to go to.

I don't like to commit my host to only one site because I like to work on different things at the same time. 

I also have a separate folder to show of special effects clips or pictures I made for friends and family to download. 
These would look like www.mydomain.com/demon/index.html, where the index.html would have a Flash .FLV player embedded in it that would launch as soon as someone went to that directory.

At this point, I am out of ideas.  I am not an expert at this, maybe you can help me come up with a solution?

I thank you for the time you have spent so far and look forward to hearing from you again.
Logged
MrPhil
Quantum Encyclopedia Writer
*****
Online Online

Posts: 3578



« Reply #5 on: August 19, 2008, 10:09:53 AM »

OK, so you have www.mydomain.com/myJoomlaSite/ and public_html/myJoomlaSite/.htaccess? That would be the right place.

You don't need to contact LP to activate anything... the Apache server is up and running, and should be running your .htaccess file. You have gone into cPanel > File Manager and confirmed that the file is in the right place, with the right name, and the right permissions?

I'm very puzzled by the "core SEF" section

Code:
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]

If the URL does not refer to an existing file AND does not refer to an existing directory AND is not /index.php AND is ending in /, .php, .html, .feed, .pdf, .raw, or / followed by anything but ".", it's redirected to index.php and some other thing in the last line which I can't figure out. I don't see anything in there which converts a static-looking URL into a dynamic URL. You're sure you got the whole thing?

I do see one thing you'll need to fix. The "index.php" it wants is not in the root (/), it's in /myJoomlaSite. So, try changing all instances of

/index.php   to   /myJoomlaSite/index.php and

index.php   to (maybe)   myJoomlaSite/index.php

See what happens then. Don't forget to clear your browser cache before loading the page again. It also might work to uncomment and change the line

# RewriteBase /   to   RewriteBase  /myJoomlaSite
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM