Page 1 of 1

RC2 SEF with mod_rewrite when Joomla installed in a subdirectory

Posted: Fri Sep 14, 2007 8:51 am
by Gare
Hi -
http://forum.joomla.org/index.php/topic,208052.0.html
suggested I post this here.  If this has been fixed/ this fix not work, feel free to delete this post if not useful.

Some Notes (on SEF in a subdirectory)
'Search Engine Friendly URL's' to 'Yes' AND 'Use Apache mod_rewrite' to 'No' gives menu relative hyperlinks without "/" like Home

Search Engine Friendly URL's to 'Yes' AND  Use Apache mod_rewrite 'Yes' gives menu relative hyperlinks with "/" like Home

Apache mod_rewrite setting to 'Yes' is the variable  $sef_rewrite = '1';  in configuration.php

so .....

Here's a hack I just got to work for mod_rewrite for a site in a subdirectory.

added else around line 321 in includes/application.php:

Code: Select all

                    $options['mode'] = $this->getCfg('sef');
			if(!$this->getCfg('sef_rewrite')) {
				$options['prefix'] = 'index.php';
			}
			else { // IS SEF_REWRITE gc mod Sept 12
					$options['prefix'] = '.';
			}
The calling code strips the ' . ', but evaluates the URL properly.  :)