Forum Moderators: phranque
#######################################################
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# This section must come first!
# Add trailing slash if path does not contain a period or end with a slash
RewriteCond %{REQUEST_URI} !(\.¦/$)
RewriteRule (.*) http://www.example.com/$1/ [R=301,L]
#Change http://example.com to http://www.example.com (Optional)
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^/?(.*)$ http://www.example.com/$1 [R=301,L]
#Rewrites http://www.example.com/subdir to http://www.example.com/
RewriteCond %{REQUEST_URI} !^/joomla
RewriteRule ^(.*)$ joomla/$1 [L]
RewriteCond %{REQUEST_URI} !^/store
RewriteRule ^(.*)$ store/$1 [L]
RewriteCond %{REQUEST_URI} !^/forum
RewriteRule ^(.*)$ forum/$1 [L]
##########################################################
For the .htaccess file in the "store" folder I am using this:
##########################################################
Options +FollowSymLinks
Options -MultiViews
RewriteEngine On
RewriteRule ^(products¦categories¦news¦reviews¦testimonials)/?(.*)$ store.php/$1
/$2 [L]
############################################################
I am sure the second .htaccess file is not entirely correct but I am real new to this and not sure where to start. Any help would be greatly appreciated!
Thanks
Ray
[edited by: jdMorgan at 12:20 am (utc) on Jan. 8, 2010]
[edit reason] example.com [/edit]
Only one of those can match. You need a much more specific pattern to match the incoming URL request so that only the correct RewriteRule is selected.
You'll also need to redirect external client requests that ask for URLs that include the folder name to make a new request for the new URL. Failure to do so means that both URLs will serve the same content.
##################################################################
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# This section must come first!
# Add trailing slash if path does not contain a period or end with a slash
RewriteCond %{REQUEST_URI} !(\.¦/$)
RewriteRule (.*) [partsmike.com...] [R=301,L]
#Change [yoursite.com...] to [yoursite.com...] (Optional)
RewriteCond %{HTTP_HOST} ^partsmike.com$
RewriteRule ^/?(.*)$ [partsmike.com...] [R=301,L]
#Rewrites [yoursite.com...] to [yoursite.com...]
RewriteCond $1 !^(store¦forum¦css¦stats)
RewriteRule ^(.*)$ joomla/$1 [L]
####################################################################
This allowed me to remove the .htaccess files in all the other folders but my problem still exists with IE only(I am using IE7 but IE6 has the problem too).
The actual files for the main page are in "partsmike.com/joomla" (actuall file location) which I am redirecting to simply "partsmike.com". The problem is with how the forums page is displayed. Those files are under "partsmike.com/forum" (actuall file location). I hope that answers both of your questions.
Thanks!
Ray
That being said given the latest posting of what I have in my .htacces file does anyone see any improvments I can make?
Thanks!
Ray