Forum Moderators: phranque
I am new to Webmaster World and am in need of a little help. I have very little experience with mod re-write other than what I have Googled.
My website is built around Miva Merchant 5 and all pages are dynamic. I am using the following to create static looking URLS:
DirectoryIndex index.html /mm5/merchant.mvc?
Options +FollowSymlinks
RewriteEngine On
#
RewriteCond %{REQUEST_URI} ^/p/(.*)/(.*)[NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Product_Code=%1&Store_Code=UTP [L]
RewriteCond %{REQUEST_URI} ^/products/(.*)/(.*)/(.*)[NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Product_Code=%1&Category_Code=%2&Store_Code=UTP [L]
RewriteCond %{REQUEST_URI} ^/category/(.*)/(.*)[NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=CTGY&Category_Code=%1&Store_Code=UTP [L]
RewriteCond %{REQUEST_URI} ^/page/(.*).html[NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=%1 [L]
All of my links are relative and I use a base href statement. For the most part, 99% of my dynamic URLS are being displayed as static looking links with no problems.
The problem I have is that my forum folder is no longer accessible. My relative link is /forum/ . When I hover over the link, it shows I should go to my forum folder. But when I follow the link, I am redirected to my home page.
I have been trying to Google a fix to exclude this folder from the above rules, but I do not have enough knowledge of mod re-write to know what I am looking for.
Any ideas?
You could:
Add an additional RewriteCond to each rule that could match the forum URLs to exclude the forum URLs from being rewritten.
RewriteCond %{REQUEST_URI} !^/URL_path_to_forum
RewriteRule ^URL_path_to_forum - [L]
RewriteRule ^URL_path_to_forum - [S=4]
For background information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim