PDA

View Full Version : Help Combining 2 Seperate .htaccess Files


teedizz
01-26-2007, 08:16 AM
Hello, I run a site that currently has 3 seperate databases. 1 for the site itself, 1 for the forums, and 1 for a different type of script. Well my main site requires a .htaccess in the server directory as well does the other script I run. When I edit 1, the other dont work and visa versa so how can I combine the 2 to where they both function correctly? Can someone pleease lend a helping hand.

Main site .htaccess file

# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
# AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

<IfModule mod_setenvif.c>
<IfDefine SSL>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</IfDefine>
</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
#
# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^download-([^/\.]+)-?$ downloadalbum.php?qtr=$1
RewriteRule ^url-([^/\.]+)-?$ download.php?qtr=$1
</IfModule>



Script that i run htaccess file

ErrorDocument 404 /community/index.php/public/notfound

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/community/file/.*
RewriteCond %{REQUEST_URI} !^/community/install/.*
RewriteCond %{REQUEST_URI} !^/community/update/.*
RewriteCond %{REQUEST_URI} !^/community/design/.*
RewriteCond %{REQUEST_URI} !^/community/plugins/.*
RewriteCond %{REQUEST_URI} !^/community/index.php/.*

RewriteRule ^(.*)$ /community/index.php/$1 [L]


Can someone pleease show how to combine both of those into please. Thanks.

akanevsky
01-26-2007, 04:43 PM
Try this:

ErrorDocument 404 /community/index.php/public/notfound

# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
# AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

<IfModule mod_setenvif.c>
<IfDefine SSL>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</IfDefine>
</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
#
# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
#
<IfModule mod_rewrite.c>
RewriteEngine on

RewriteRule ^download-([^/\.]+)-?$ downloadalbum.php?qtr=$1
RewriteRule ^url-([^/\.]+)-?$ download.php?qtr=$1

RewriteCond %{REQUEST_URI} !^/community/file/.*
RewriteCond %{REQUEST_URI} !^/community/install/.*
RewriteCond %{REQUEST_URI} !^/community/update/.*
RewriteCond %{REQUEST_URI} !^/community/design/.*
RewriteCond %{REQUEST_URI} !^/community/plugins/.*
RewriteCond %{REQUEST_URI} !^/community/index.php/.*

RewriteRule ^(.*)$ /community/index.php/$1 [L]
</IfModule>