Homepage won't load without /index.php added

Need help installing Joomla!? For all Joomla! installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
jonski13
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Oct 07, 2010 10:44 am
Location: Cambridge, UK
Contact:

Homepage won't load without /index.php added

Postby jonski13 » Wed Apr 06, 2011 10:56 am

Hi, I'm tearing my hair out! I've just moved my Joomla install from plesk to cpanel and all is fine. Except the URL: http://www.swaysearch.com won't load. It ONLY works as http://www.swaysearch.com/index.php

Anyone got any ideas? I've tried various .htaccess approaches but no joy. I'm using SEF URLs fine (once onto the site using /index.php).

Cheers

John
Please read forum rules regarding signatures: viewtopic.php?t=65

User avatar
princessbs
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Wed Jan 24, 2007 2:07 pm

Re: Homepage won't load without /index.php added

Postby princessbs » Wed Apr 06, 2011 3:54 pm

Guess you have it working now swaysearch.com shows up fine.
BSolberg

Adopt the pace of nature: her secret is patience. ~Ralph Waldo Emerson

jonski13
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Oct 07, 2010 10:44 am
Location: Cambridge, UK
Contact:

Re: Homepage won't load without /index.php added

Postby jonski13 » Thu Apr 07, 2011 10:37 am

Hi Princessbs, yup, after much Googling .htaccess code I finally got it sorted. The problem was I'd set up canonical URLs in the htaccess which for some reason caused an error when they server was transferred over. A small tweak to the code and the addition of the directoryindex line seem to have sorted it.

If anyone else is having the same grief try using the code below in the htaccess (it includes the canonical URL to redirect http://mysite to http://www.mysite). Just replace the existing code under the initial initial blurb with this (and replace mysite with your domain name).

## Can be commented out if causes errors, see notes above.
#Options FollowSymLinks
DirectoryIndex index.php index.html

#
#mod_rewrite in use

RewriteEngine On
rewritecond %{http_host} ^mysite\.com
rewriterule (.*) http://www.mysite.com/$1 [r=301,L]

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

# RewriteBase /

Cheers

John
Please read forum rules regarding signatures: viewtopic.php?t=65

User avatar
princessbs
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Wed Jan 24, 2007 2:07 pm

Re: Homepage won't load without /index.php added

Postby princessbs » Thu Apr 07, 2011 11:46 am

Nice work John. Thanks for posting your solution, it will no doubt help others in the future.
BSolberg

Adopt the pace of nature: her secret is patience. ~Ralph Waldo Emerson

designomite
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Feb 23, 2010 8:21 pm

Re: Homepage won't load without /index.php added

Postby designomite » Tue Apr 26, 2011 2:27 am

i was having the same issue. it was solved by adding " DirectoryIndex index.php " to the very 1st line of my .htaccess file. I somehow missed that in your post so i thought i'd add some emphasis to that part for anyone else having the same problem. thanks for posting.

jonski13
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Oct 07, 2010 10:44 am
Location: Cambridge, UK
Contact:

Re: Homepage won't load without /index.php added

Postby jonski13 » Tue May 10, 2011 10:35 am

Hi guys, I've come across a better solution for this that redirects the /index.php back to the root. Much more SEO friendly as the link juice isn't spread over multiple pages:

Remove the line:

DirectoryIndex index.php index.html

And replace it with:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.domainname.com/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Works beautifully on my site: http://www.swaysearch.com

Cheers

John
Please read forum rules regarding signatures: viewtopic.php?t=65

g1smd
Joomla! Guru
Joomla! Guru
Posts: 951
Joined: Mon Feb 21, 2011 4:02 pm
Location: UK

Re: Homepage won't load without /index.php added

Postby g1smd » Tue May 10, 2011 11:04 am

The code for your non-www to www redirect fails to redirect some non-canonical requests.

The -f and -d "exists" checks are very inefficient and slow your site down for all requests.

The new code is as follows (and you won't need the first two directives if you are adding it to an existing Joomla .htaccess file):

Code: Select all

########## Begin - 301 Redirect
#
Options +FollowSymLinks
RewriteEngine on
#
DirectoryIndex index.php index.html
#
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|home)\.html?\ HTTP/
RewriteRule ^(([^/]+/)*)(index|home)\.html?$ http://www.example.com/$1 [R=301,L]
#
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^(([^/]+/)*)index\.php$ http%2://www.example.com/$1 [R=301,L]
#
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
#
########## End - 301 Redirect

I urge you to use the new .htaccess file that comes with Joomla 1.5.23 onwards or Joomla 1.6.2 onwards. Look for the file called htaccess.txt in the installer package. It contains a note showing exactly where the redirects should go (in addition to a number of other changes). Add your new redirect code in the file at the point it says "redirects go here", or similar. The new file works with all older versions of Joomla.

That file also contains much more efficient code for the rewrite to Joomla's front controller index.php file. It eliminates the costly and inefficient -f and -d "exists" checks for the majority of requests hitting your server and which will never be rewritten.
Online since 1995.

jonski13
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Oct 07, 2010 10:44 am
Location: Cambridge, UK
Contact:

Re: Homepage won't load without /index.php added

Postby jonski13 » Tue May 10, 2011 11:13 am

Hi g1smd, thanks for that - works beautifully. Wasn't aware that the htaccess file had been updated - good to know and great to hear it's standard now.

Cheers

John
Please read forum rules regarding signatures: viewtopic.php?t=65

g1smd
Joomla! Guru
Joomla! Guru
Posts: 951
Joined: Mon Feb 21, 2011 4:02 pm
Location: UK

Re: Homepage won't load without /index.php added

Postby g1smd » Tue May 10, 2011 11:32 am

Yes, the new .htaccess file contains improved code for the rewrite part of the job.

It does NOT include the redirect code featured above. You will have to manually add that yourself. What the new .htaccess file does have, is a placeholder showing the exact point in the file that these additional redirects should be placed.
Online since 1995.

www2233
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Nov 18, 2011 3:46 pm

Re: Homepage won't load without /index.php added

Postby www2233 » Fri Nov 18, 2011 6:18 pm

hi
I have similar problem but the server is IIS Can anyone share the solution for IIS server ?

thambi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Aug 10, 2006 4:03 am

Re: Homepage won't load without /index.php added

Postby thambi » Mon Dec 05, 2011 11:32 pm

g1smd wrote:Yes, the new .htaccess file contains improved code for the rewrite part of the job.

It does NOT include the redirect code featured above. You will have to manually add that yourself. What the new .htaccess file does have, is a placeholder showing the exact point in the file that these additional redirects should be placed.


hi g1smd,
more than 50000 urls showing 301 redirect in google webmaster tools because of this. request help
below is the default joomla htaccess code. wish to place my 301 redirect. tried but failed can you help me place it at the point mentioned above

+++++++++++++++++++++++

##
# @version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 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!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
# 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 data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%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})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
########## End - Rewrite rules to block out some common exploits


########## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
########## End - Custom redirects


# 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
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
########## End - Joomla! core SEF Section
########## Begin - 301 Redirect
#
Options +FollowSymLinks
RewriteEngine on
#
DirectoryIndex index.php index.html
#
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|home)\.html?\ HTTP/
RewriteRule ^(([^/]+/)*)(index|home)\.html?$ http://www.samratbazaar.com.sg/$1 [R=301,L]
#
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^(([^/]+/)*)index\.php$ http%2://www.samratbazaar.com.sg/$1 [R=301,L]
#
RewriteCond %{HTTP_HOST} !^(www\.samratbazaar\.com \.sg)?$
RewriteRule (.*) http://www.samratbazaar.com.sg/$1 [R=301,L]
#
########## End - 301 Redirect

thanks

g1smd
Joomla! Guru
Joomla! Guru
Posts: 951
Joined: Mon Feb 21, 2011 4:02 pm
Location: UK

Re: Homepage won't load without /index.php added

Postby g1smd » Wed Dec 07, 2011 12:11 pm

Didn't you see the part that says:

########## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
########## End - Custom redirects

You cannot and must not place the redirects after the rewrite code otherwise you will expose previously rewritten requests back out on to the web as new URLs.
Online since 1995.

thambi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Aug 10, 2006 4:03 am

Re: Homepage won't load without /index.php added

Postby thambi » Wed Dec 07, 2011 3:44 pm

thanks g1smd

works like a charm.

thanks once again

g1smd
Joomla! Guru
Joomla! Guru
Posts: 951
Joined: Mon Feb 21, 2011 4:02 pm
Location: UK

Re: Homepage won't load without /index.php added

Postby g1smd » Thu Dec 08, 2011 8:12 am

Make sure these lines appear only once each:

Options +FollowSymLinks

RewriteEngine on

The correct place for them is near the beginning of the file.
Online since 1995.

thambi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Aug 10, 2006 4:03 am

Re: Homepage won't load without /index.php added

Postby thambi » Thu Dec 08, 2011 10:01 am

CORRECTED NOW, thanks a lot, so many days i suffered with so many solutions going wrong, and server overloading.
now thanks to you sir, one last request to check if anything else wrong in the .htaccess file below
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

##
# @version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 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!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
# 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 data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%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})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
########## End - Rewrite rules to block out some common exploits


########## Begin - Custom redirects
#

########## Begin - 301 Redirect
#
DirectoryIndex index.php index.html
#
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|home)\.html?\ HTTP/
RewriteRule ^(([^/]+/)*)(index|home)\.html?$ http://www.samratbazaar.com.sg/$1 [R=301,L]
#
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^(([^/]+/)*)index\.php$ http%2://www.samratbazaar.com.sg/$1 [R=301,L]
#
RewriteCond %{HTTP_HOST} !^(www\.samratbazaar\.com.sg)?$
RewriteRule (.*) http://www.samratbazaar.com.sg/$1 [R=301,L]
#
########## End - 301 Redirect
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
########## End - Custom redirects


# 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
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
########## End - Joomla! core SEF Section

g1smd
Joomla! Guru
Joomla! Guru
Posts: 951
Joined: Mon Feb 21, 2011 4:02 pm
Location: UK

Re: Homepage won't load without /index.php added

Postby g1smd » Thu Dec 08, 2011 8:08 pm

Looks good.

For readability I would move the single DirectoryIndex line to the very top as it has nothing to do with redirects or rewrites.
Online since 1995.

thambi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Aug 10, 2006 4:03 am

Re: Homepage won't load without /index.php added

Postby thambi » Thu Dec 08, 2011 9:27 pm

great thanks, would do it. i was more worried about redirects, sometimes overloading the server . wanted to make sure that redirect syntax is correct. thanks a lot sir, very much indebted for your timely help

cameroncoop
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Mar 19, 2013 2:06 pm

Re: Homepage won't load without /index.php added

Postby cameroncoop » Tue Mar 19, 2013 2:12 pm

I really need some help. I have been struggling with this .htaccess file... Basically the site im working on wont load the webpage without manually typing /index.php

so this doesnt work: www.xtarlight.co.za

and this does: www.xtarlight.co.za/index.php

I currently have SEF, mod rewrite and Suffix unchecked.

Running Joomla 1.5.25

===============================================================================
The .htaccess file looks like this:
===============================================================================
##
# @version $Id: htaccess.txt 14401 2010-01-26 14:10:00Z louis $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 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.
#
#####################################################
ErrorDocument 404 /404.shtml
## 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!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
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

==============================================================================

What is wrong here? Please help me!! URGENT STUFF :)

g1smd
Joomla! Guru
Joomla! Guru
Posts: 951
Joined: Mon Feb 21, 2011 4:02 pm
Location: UK

Re: Homepage won't load without /index.php added

Postby g1smd » Thu Mar 21, 2013 2:16 pm

You have a very old htaccess file. You should update to a later version.

You'll also need to add the correct DirectoryIndex directive as noted in earlier posts.
Online since 1995.

sush9
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Apr 25, 2013 10:38 am

Re: Homepage won't load without /index.php added

Postby sush9 » Thu Apr 25, 2013 10:43 am

Hi I am having a similar problem - My .htaccess redirects from www. to non www - so it has a redirect in process already - however I have more than one homepage ! which i am very puzzled with - I am very confused.

:(

Basically the page loads up with index.html, index.php and without either - so in a sense i have repeated contact (is this bad for my SEO?)

The website is running on joomla 1.5.6

Any ideas of what I need to do?

It may be a simple solution as I am very bad with coding and stuff (I am a designer) so I do need some advice on this website on what I need to do with htaccess file or whatever it is in Joomla.

Please help!

kmxorbit
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed May 01, 2013 3:32 pm

Re: Homepage won't load without /index.php added

Postby kmxorbit » Wed May 01, 2013 3:37 pm

What also might do the "trick" is, if your root folder contains an index.html next to a index.php file (which is standard by a plesk installation), is to rename the index.html file to something else (I always rename to index.html.original)
Then Reload your page in your browser.

charlythegood
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Sep 23, 2013 4:30 pm

Re: Homepage won't load without /index.php added Heeelpp!!

Postby charlythegood » Mon Sep 23, 2013 5:02 pm

Please HEEELP!!!!

it´s the same problem:
mysyte.cl --> 404
mysyte.cl/index.php/home --> connect

i've an empty .htaccess and an htaccess.txt, code:

##
# @package Joomla
# @copyright Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##

##
# 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 base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%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})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# 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.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

BarbaraW
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun May 18, 2014 5:21 pm

Re: Homepage won't load without /index.php added

Postby BarbaraW » Thu May 29, 2014 4:19 pm

TO jonski13 from Cambridge, UK back in April of 2010, thank you SO much, it worked like a charm. You're a Joomla rockstar! :o)

OMG. I have spent hours upon hours and days upon days round the clock making myself crazy - if you work in Joomla, you know what I mean - trying to reconfigure things to get a Joomla 2.5 site to first appear, then appear without adding/index.php after the domain name - AND trying to figure out how to lose the index.php extension as well as it is rather clumsy and clutters things up.

------------------------------------------------------------------------------------------------
"after much Googling .htaccess code I finally got it sorted. The problem was I'd set up canonical URLs in the htaccess which for some reason caused an error when they server was transferred over. A small tweak to the code and the addition of the directoryindex line seem to have sorted it.

If anyone else is having the same grief try using the code below in the htaccess (it includes the canonical URL to redirect http://mysite to http://www.mysite). Just replace the existing code under the initial initial blurb with this (and replace mysite with your domain name).

## Can be commented out if causes errors, see notes above.
#Options FollowSymLinks
DirectoryIndex index.php index.html

#
#mod_rewrite in use

RewriteEngine On
rewritecond %{http_host} ^mysite\.com
rewriterule (.*) http://www.mysite.com/$1 [r=301,L]

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

# RewriteBase /


Return to “Installation - 1.0.x”

Who is online

Users browsing this forum: No registered users and 5 guests