English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

.htaccess / SEF urls - how to write access rules
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: .htaccess / SEF urls - how to write access rules
#4391
.htaccess / SEF urls - how to write access rules 14 Years, 6 Months ago Karma: 0
Hiya,

we are using version 1.2.23 of JMS.

We are trying to set all the SEO settings to yes, we are running into trouble when we enable the 'Use Apache mod_rewrite'. The message we get is:
'Not Found, The requested URL /index.php was not found on this server'. Of course, we enabled mod_rewrite on this server (localhost), and also placed the default .htaccess file in the root.

We have the following setup:
localhost/joomlamulti (master)
localhost/slave1
localhost/slave2
etc.

The aliases we put in our httpd.conf are working properly, so the slave sites work. Example alias in apache's httpd.conf:

Code:

Alias /slave1 "c:/<my_local_path>/JoomlaMulti/" 

<Directory "c:/<my_local_path>/JoomlaMulti/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order allow,deny
    Allow from all
</Directory>



I read on the forum that we should put a seperate .htaccess file in the slave site folder. If i understand this correctly, I have to place a seperate .htaccess in joomlaroot/multisites/slave1, right? We tried placing a copy of the default htaccess there. This didnt work. Then we changed the RewriteBase to 'slave1' in joomlaroot/multisites/slave1/.htaccess, this still didnt do the trick. We were wondering if this .htaccess file is even read.

So, my question is, where to put the htaccess files, and what to write in them to make the sites work correctly. A funny note on the side: if we do
Code:

RewriteBase /slave1
in the default .htaccess in the root of joomla, slave1 works great (but of course, all the other slaves are not working)


Our .htaccess in joomlaroot:

Code:

##
# @version $Id: htaccess.txt 13415 2009-11-03 15:53:25Z ian $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 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
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

SaM
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4394
Re: .htaccess / SEF urls - how to write access rules 14 Years, 6 Months ago Karma: 54
First, I don't understand why in the httpd.conf you have written an
Alias /slave1 "c:/<my_local_path>/JoomlaMulti/"

If the slave site is into a subdirectory of your master website, this is not necessary.

Second if you try to modify the RewriteBase /
Why have you writte a file name at the end
RewriteBase to 'slave1' in joomlaroot/multisites/slave1/.htaccess,

Perhaps you have to write something like
RewriteBase /multisites/slave1/
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla