Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 10:02 am (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
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
Posted: Sun Nov 08, 2009 3:35 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 14, 2009 7:17 pm
Posts: 18
My .htaccess is in my root folder but I'm getting a 500 internal server error when clicking on a submenu in the frontend. I know I have to change some mod_rewrite stuff but I have no clue what, nor am I very good at it.

This is what I have in there:


## 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


Top
  E-mail  
 
Posted: Sun Nov 08, 2009 5:01 am 
Joomla! Virtuoso
Joomla! Virtuoso
Offline

Joined: Wed Aug 13, 2008 2:57 am
Posts: 4769
(a) Hope the file .htaccess is located in the directory where Joomla! is installed

(b) Hope you have set the parameters Search Engine Friendly URLs and Use Apache mod_rewrite to Yes.

(c) Remove the comment from the line # RewriteBase /. The resultant line is RewriteBase /

_________________
- MIG
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged


Top
  E-mail  
 
Posted: Sun Nov 08, 2009 9:19 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 14, 2009 7:17 pm
Posts: 18
Ok,

Fixed the last (c), and now I'm getting this:

Code:
Warning: require_once(/home/feher/public_html/includes/defines.php) [function.require-once]: failed to open stream: No such file or directory in /home/feher/public_html/index.php on line 21

Fatal error: require_once() [function.require]: Failed opening required '/home/feher/public_html/includes/defines.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/feher/public_html/index.php on line 21

How am I suppose to insert:
Code:
(include_path='.:/usr/lib/php:/usr/local/lib/php')
in order to not get any PHP errors?

This is what I have in line 21 right now:

Code:
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );


Top
  E-mail  
 
Posted: Sun Nov 08, 2009 9:25 pm 
Joomla! Virtuoso
Joomla! Virtuoso
Offline

Joined: Wed Aug 13, 2008 2:57 am
Posts: 4769
Check whether the values for the variables $log_path and $tmp_path are correct in the configuration.php. You could also check and change it in the Global Configuration.

_________________
- MIG
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged


Top
  E-mail  
 
Posted: Sun Nov 08, 2009 9:36 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 14, 2009 7:17 pm
Posts: 18
Code:
var $log_path = '/home/feher/public_html/joomla/logs';
var $tmp_path = '/home/feher/public_html/joomla/tmp';


(My config file is already out of the public_html folder, as per Joomla! security instructions)


Top
  E-mail  
 
Posted: Sun Nov 08, 2009 10:11 pm 
Joomla! Virtuoso
Joomla! Virtuoso
Offline

Joined: Wed Aug 13, 2008 2:57 am
Posts: 4769
At this juncture, I believe that someone else has to review the situation. Suggest reviewing the reviewing the following documents to check whether the

http://www.scribd.com/doc/2300167/Joomla-v-15-Configure-and-troubleshoot-SEF-URLs
http://docs.joomla.org/How_to_check_if_mod_rewrite_is_enabled_on_your_server

http://docs.joomla.org/SEF_URLs_in_Joomla!_1.5
http://docs.joomla.org/SEF

_________________
- MIG
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged


Top
  E-mail  
 
Posted: Sun Nov 08, 2009 10:57 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 14, 2009 7:17 pm
Posts: 18
I suppose if I put the .htaccess file back to the public_html directory that's not too secure?


Top
  E-mail  
 
Posted: Mon Nov 09, 2009 8:53 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Mon Nov 09, 2009 7:37 am
Posts: 3
Hello, I have an error that .htaccess file corrupted. I don't know how to recover it?? So can anyone help me regarding this issue??

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


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

Quick reply

 



Who is online

Users browsing this forum: fcc and 37 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 © 2000, 2002, 2005, 2007 phpBB Group