Joomla/SMF: Login Integration Fine, but 404's in SMF...

Started by toob, November 20, 2005, 05:10:16 PM

Previous topic - Next topic

toob

Greetings,

I have been fighting this all day.  I am working with a very recent install of Joomla/SMF 1.0.5, trying to get the integration worked out before offering content to either location.  The Joomla/SMF bridge works  -- I log in via Joomla and my SMF forum appears to open.  I get the "Welcome" message with my name, etc. etc., it shows the no. of registered users, the no. of posts, even the name of the last post and date/time of the latest post.  However, when I access SMF via Joomla like this (via either Wrapper or unwrapped), all the links in the forum provide 404 errors.  Joomla is installed into the main directory of the site (not a subdirectory).  My SMF forums are installed in a subdirectory and can be accessed directly by bypassing Joomla (http://common.t2forums.com [nofollow]), and those links all work just fine.  However, the page that Joomla's login leads to (http://t2forums.com/index.php?option=com_smf&Itemid=27& [nofollow]) provides the main SMF page with no working links.  Not to mention, that the second link I provided here can be accessed directly, which seems odd (doesn't it?) if it is supposed to be linked to via Joomla's login.  I suppose I was hoping for an integration where it wasn't possible to just be able to access it from some back-end link somewhere, without logging in first.

Have I missed something?   ???

Thanks in advance, SMF is great, and I can't wait to be able to take full advantage of its capabilities, as soon as I get the kinks ironed out!

--Melissa

<site in question: www.t2forums.com [nofollow]>

Orstio

The same thing happens with every SEF link on your homepage:

http://t2forums.com/index.php

When you enable SEF in Joomla, you need to rename htaccess.txt to .htaccess.

toob

This is odd, as the .htaccess file in the directory is not .htaccess.txt.  I wonder if it is a problem to disable this.  I really want visitors coming to this site from its parent site, as opposed to search engines, anyway. . . . .   This is just odd!  Thanks for your insight as to what the problem is, although I'm just not seeing it in the server.  I will re-upload the file and ensure it doesn't have .txt at the end, although currently on the server, is is just .htaccess (when all other files show the file extension at the end).

--Melissa

Orstio

The file is probably currently named:

htaccess.txt

it needs to be named:

.htaccess

notice the dot at the beginning.

toob

Wow, what a moron I am!  I didn't even notice that. 

Thanks!!   ;D

--Melissa

toob

Okay, I may not have consciously not noticed the DOT-htaccess, but that is what the file is called.  I downloaded it, resaved it as .htaccess.txt and then uploaded it back to the server. . . then renamed it on the server as .htaccess and no dice  :'(  This seems like it ought to be so simple.

--Melissa

Orstio

Is there a file on the server named htaccess.txt, in addition to the file named .htaccess?

toob

I renamed that "oldhtaccess-orig.txt" but even after deleting that file, with the .htaccess file in place, it still isn't doing any good.  It will work, however, if I disable SEF, but since the renaming is so easy (or supposed to be!), you would think I would still be able to enjoy the benefits of having SEF, in theory, anyway!   :)

--Melissa

Orstio

OMG.

You need to delete the .htaccess file, and rename htaccess.txt to .htaccess in order to make SEF work.

You made this far more complicated than it needs to be.

All you needed to do was take the file htaccess.txt and overwrite whatever was in .htacess.

Now you have completely deleted it?

toob

Yipes!  No, I did NOT delete the .htaccess file.  It is there, just like that,

.htaccess

no .txt after it.

(I deleted the renamed one that I left there as my own paranoia thing which I'd originally renamed "oldhtaccess-orig.txt" and left on the server.  I am paranoid about losing things permanently, believe me!)  So there is only one .htaccess file and it does not have txt after it or anything.

After browsing the Joomla forums, I even went so far as to double-check with my host to ensure that mod_rewrite is indeed enabled on the apache server (which it is).  I can't imagine why this isn't working.  Thanks for trying to help, though, and sorry to get you so frustrated.  I suppose my option now is to disable SEF as the links seem to work when it is disabled.

--Melissa

Orstio

So, is this what you did?:

Renamed htaccess.txt to oldhtaccess-orig.txt.

Deleted oldhtaccess-orig.txt.

The devs at Joomla tried to make this as painless as possible.  All you ever need to do to enable SEF is check the option in your admin panel, and rename the file htaccess.txt to .htaccess.  The file htaccess.txt has everything needed to make SEF work, except it is given the wrong filename (on purpose, in case you don't want, or cannot use SEF.)

The contents of htaccess.txt look like this:

##
# @version $Id: htaccess.txt,v 1.5 2005/01/22 23:00:27 spacemonkey Exp $
# @package Mambo
# @copyright (C) 2000 - 2005 Miro International Pty Ltd
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Mambo is Free Software
##

#
#  mod_rewrite in use
#

RewriteEngine On

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

# RewriteBase /YourMamboDirectory

#
#  Rules
#

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php


As long as that is in a file called .htaccess, SEF should work.  So, from a clean start, all you need to do is rename the file.

At this point, I am thinking what you will need to do is copy the above code, and paste it into the file called .htaccess.

toob

Well, had the enabling SEF via the Joomla panel worked, I would not be here now  :D

Here is the text that is in my .htaccess file: 

##
# @version $Id: htaccess.txt 423 2005-10-09 18:23:50Z stingrey $
# @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
##
#
#  mod_rewrite in use
#
#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update YourJoomlaDirectory (just / for root)
#  RewriteBase /YourJoomlaDirectory
#
#  Rules
#


That is the original .htaccess file. 

That is the image of the file in my server.  It is in the main Joomla directory.  Note there is no .txt at the end, etc.


That is obviously the control panel showing that it is enabled.  I have tried both making it unwriteable and writeable when saving.  I have also tried it by taking out the comment in front of #  RewriteBase /YourJoomlaDirectory

This is why I feel like such an idiot.......

--Melissa

Kindred

you need the bit at the end....

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php


otherwise, even with rewrite turned on, the system won't have any rules to apply!
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

c3sniper

After searching and searching the internet...I came across this post.  Thankfully!  I was having the same issues with .htaccess and had no idea what was to go in the file.  Thank you to everyone who posted here - because it saved me sooooo much headache with those darn 404's!!!
Thank you again.
V-

Advertisement: