Intro page with SEF: Difference between revisions

From Joomla! Documentation

Erdsiger (talk | contribs)
New page: We have a Joomla SEF enabled site. We want to display an intro flash page when the request is / and let the Joomla continue to work without touching our site. We have an /intro/index.html ...
 
Cmb (talk | contribs)
Corrected begining to beginning.
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
We have a Joomla SEF enabled site.
{{CoreHackNotice}}
 
We have a Joomla [[Search Engine Friendly URLs|SEF]] enabled site.
We want to display an intro flash page when the request is / and let the Joomla continue to work without touching our site.
We want to display an intro flash page when the request is / and let the Joomla continue to work without touching our site.
We have an /intro/index.html that is the intro flash page.
We have an /intro/index.html that is the intro flash page.
We have mod_proxy properly configured (or we must s:P:R to Rewrite flags below)
We have [http://httpd.apache.org/docs/2.1/mod/mod_proxy.html mod_proxy] properly configured (or we must substitute <code>R</code> for <code>P</code> in the Rewrite flags below)


Modify .htaccess (or equivalent apache configuration file) adding under the line of RewriteBase:
Modify <code>.htaccess</code> (or equivalent Apache configuration file) adding under the line of RewriteBase:


<source lang="apache">
<source lang="apache">
Line 11: Line 13:
</source>
</source>


Modify the mod_mainmenu in modules/mod_mainmenu/helper.php:
If you have any problem try to put rules at the beginning of the file .htaccess
 
Modify the mod_mainmenu in <code>modules/mod_mainmenu/helper.php</code>:


<source lang="php">
<source lang="php">
Line 20: Line 24:
} elseif (strcasecmp(substr($tmp->url, 0, 4), 'http') && (strpos($tmp->link, 'index.php?') !== false)) {
} elseif (strcasecmp(substr($tmp->url, 0, 4), 'http') && (strpos($tmp->link, 'index.php?') !== false)) {
</source>
</source>
This trick was originally posted on Tips&Tricks Forum Section, feel free to contact [http://forum.joomla.org/memberlist.php?mode=viewprofile&u=197020 the original author] if you have any questions.


[[Category:Tips and tricks]]
[[Category:Tips and tricks]]
[[Category:Tips and tricks 1.5]]
[[Category:Tips and tricks 1.5]]

Latest revision as of 17:53, 16 September 2022

Warning!

This is a core hack. Files you change as described on this page will be overwritten during updates of Joomla!. For more information, see Core hack.

We have a Joomla SEF enabled site. We want to display an intro flash page when the request is / and let the Joomla continue to work without touching our site. We have an /intro/index.html that is the intro flash page. We have mod_proxy properly configured (or we must substitute R for P in the Rewrite flags below)

Modify .htaccess (or equivalent Apache configuration file) adding under the line of RewriteBase:

RewriteRule ^$ /intro/ [P]
RewriteRule ^index\.html$ /index.php [P]

If you have any problem try to put rules at the beginning of the file .htaccess

Modify the mod_mainmenu in modules/mod_mainmenu/helper.php:

$iSecure = $iParams->def('secure', 0);                                                                                                           
if ($tmp->home == 1) {
  //Change the home to index.html (see .htaccess)
  $tmp->url = JURI::base().'index.html';
} elseif (strcasecmp(substr($tmp->url, 0, 4), 'http') && (strpos($tmp->link, 'index.php?') !== false)) {

This trick was originally posted on Tips&Tricks Forum Section, feel free to contact the original author if you have any questions.