.htaccess in Joomla directory

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
texc4
Starting out
Posts: 18
Joined: Thu Mar 12, 2009 6:08 pm

.htaccess in Joomla directory

Post by texc4 »

Hello,
I use Joomla 1.0.x on a TS109
My web site is ok and all is working fine but I can't activate SEO ( url rewriting ) in joomla. I tried many things.
My .htaccess is OK, I think.

When SEO is activated I have 404 not found errors...

I think .htaccess is not read
I just follow Joomla standard recommandations Qweb/Joomla/.htaccess

Please Help! :(
texc4
Starting out
Posts: 18
Joined: Thu Mar 12, 2009 6:08 pm

Re: .htaccess in Joomla directory

Post by texc4 »

WORKS FINE WITH:

If you ever tried to activate SEO in Joomla! without success, here is a tip.
This is a simple hack you can try if you can't make urlRewriting work.

First af all edit the file "/includes/sef.php" and replace the line 502

return $mosConfig_live_site .'/'. $string . $fragment;

with

return $mosConfig_live_site."/index.php/". $string . $fragment;

The forget anything about the .htaccess file!
Just activate SEO in Joomla! configuration.


--------------------------------------------------------------------------------
Anyway, you should try this custom .htaccess file. Simply replace "pathtomydir" (bold) if your Joomla is not at the root of your webserver.

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


########## 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} ^(/pathtomydir/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 - #
#RewriteCond %{REQUEST_URI} ^(/pathtomydir/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
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”