The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Wed May 02, 2012 10:24 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 05, 2012 9:30 am
Posts: 13
Hi,
I am trying to remove all php reference from the urls of my site for SEO. I am trying to remove the /index.php part of the url. I have renamed the htaccess.txt file to .htaccess and then changed the SEO settings in my web sites control panel. I understand from the various forums that with the txt file rename and activation of "use URL rewriting" and "adds suffix to URL" in global config it should work but I get an internal server error. Having looked again at the various forums they recommend that I contact my host who may need to change the php configuration to make this work properly. I have contacted my host who have checked the server and advised me that everything is enabled with everything I need and the only reason for the error is that my .htaccess file has the wrong syntax inside it. The site is running on a Linux server.

They have sent me a link to show what modules etc are installed on the server, as follows: http://vhost10.yoursitepreview.net/info.php

Can anyone help please. I am a newbie to all of this and this is far out of my comfort zone so please treat me like an idiot!

Thanks a lot.

Paul


Top
 Profile  
 
PostPosted: Thu May 03, 2012 6:15 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sun Oct 22, 2006 4:42 am
Posts: 9352
Location: Sunshine Coast, Queensland, Australia
if you are using the standard, unmodified htaccess file that comes with Joomla! there should be no problems at all, it works just fine on 100's of 000's of other servers.

ensure that the htaccess.txt file has been renamed correctly yo only ".htaccess" with no .txt extension. If this is correct, try editing the .htaccess file and place a "#" in front of the line "Follow SymLinks" some server configurations will not allow this option.

_________________
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
Network SMARTS, Systems Engineering http://www.networksmarts.com.au/


Top
 Profile  
 
PostPosted: Thu May 03, 2012 11:08 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 05, 2012 9:30 am
Posts: 13
Thanks for that.

Have tried your suggestion and still get the server error when I switch on the SEO options. I noticed that the file also suggested this, so looked as if we were going in the right direction. My Host is Easy Space if this is useful.

Paul


Top
 Profile  
 
PostPosted: Thu May 03, 2012 2:47 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sun Oct 22, 2006 4:42 am
Posts: 9352
Location: Sunshine Coast, Queensland, Australia
go back to the host with the htaccess fle and ask them to point out the "syntax" error, as this file works on many 000's of other sites without issue.

_________________
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
Network SMARTS, Systems Engineering http://www.networksmarts.com.au/


Top
 Profile  
 
PostPosted: Thu May 03, 2012 2:56 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 05, 2012 9:30 am
Posts: 13
Will do. Luckily I have left the ticket open.

I will let you know how I get on. Thanks again for your help with this.

Paul


Top
 Profile  
 
PostPosted: Fri May 04, 2012 8:52 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 05, 2012 9:30 am
Posts: 13
Unfortunately got the following response: "I have had a look over the files and unfortunately with my limited understanding of rewrite rules I am unable to offer any assistance. Our support team are not trained web designers and our support with coding issues is limited. Sorry we could not be of more help on this occasion."
Here is the content of the htaccess file. Can you or anyone else spot any error?

##
# @package Joomla
# @copyright Copyright (C) 2005 - 2012 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.


Top
 Profile  
 
PostPosted: Fri May 04, 2012 9:09 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sun Oct 22, 2006 4:42 am
Posts: 9352
Location: Sunshine Coast, Queensland, Australia
this is the default standard htaccess file, it works on many 000's of other servers, the only thing I can suggest is to keep commenting out ( add # infront of each line) one line at a time until it works to see where the server is having a problem.

but to be honest, that hosts response is pretty poor and I would actually move from them seeing as this is neither a design or a programmer/coder file, it is an Apache configuration file, and if they do not understand how to configure htaccess on Apache then I would not trust them to adaquately support my sites...

_________________
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
Network SMARTS, Systems Engineering http://www.networksmarts.com.au/


Top
 Profile  
 
PostPosted: Fri May 04, 2012 9:23 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 05, 2012 9:30 am
Posts: 13
Good point. I do feel they have copped out on this one.
Will try your suggestion.
Thanks
Paul


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 



Who is online

Users browsing this forum: jayapcp and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group