Useful tip for Joomla Sites

Status
Not open for further replies.

cwilkinson199878

New Member
Messages
34
Reaction score
0
Points
0
The joomla default homepage is http://[yoursite.x10.bz]/index.php so that means http:[yoursite.x10.bz] doesn't work on its own. You can fix this by copy and pasting the code below onto your ".htaccess" file using the Cpanel File manager.

1. Go to Cpanel and open file manager and choose web root.
2. Click once on the .htaccess file that's in that folder and click EDIT at the top, not code editor.
3. Copy and paste the following code into the file, changing whatever is in curly brackets only to suit your needs. IE your website address. Remove the curly brackets when you've added your details. Also for all the places you have to add in your site address, leave out the http:// bit. It has been already added were needed!

//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^{YOUR SITE ADDRESS HERE}/index.php[nc]
RewriteRule ^(.*)$ http://{YOUR SITE ADDRESS HERE}/index.php/$1 [r=301,nc]


//Custom 404 errors
ErrorDocument 404 http://{your site here}/index.php/404error

4. Click Save changes at the top right hand corner and test your site without adding the /index.php bit!!

Example one for my joomla site

//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^cwilkinson1998.x10.bz/index.php[nc]
RewriteRule ^(.*)$ http://www.cwilkinson1998.x10.bz/index.php/$1 [r=301,nc]


//Custom 404 errors
ErrorDocument 404 http://cwilkinson1998.x10.bz/index.php/404error


Click thanks if this helped :)
Chris

---------- Post added at 06:48 PM ---------- Previous post was at 06:44 PM ----------

Remember to remove the Curly Brackets!!
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
All you need is the line

DirectoryIndex index.php index.html

in your .htaccess file.

You may have been on set ups where the "default" is that just index.html is used, but that is non-standard. Or perhaps the line

DirectoryIndex index.html index.php

was used and you did not remove the default index.html file in the directory.
 

cwilkinson199878

New Member
Messages
34
Reaction score
0
Points
0
Ok, I never knew that. But the 404 redirect works for bypassing X10's 404 page which is littered with ads
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
littered with ads
They aren't that bad :wink: Plus, it helps x10Hosting to stay alive.
 
Status
Not open for further replies.
Top