View Full Version : htaccess rewrite

04-06-2010, 08:48 AM
I have an htaccess that has rewrites for a shopping cart and has dynamic links. But on some of those I want to make them static. I would like to say if this static page exists then show it. If not then show the dyanmic generated page.

But when i do this the page just goes back to home page instead of showing the static page. If I remove htaccess alltogether, then the page shows, so I know my htaccess is wrong. (duh) :)

Anyway here is the htaccess file

DirectoryIndex index.html /mm5/merchant.mvc
RewriteEngine On
RewriteRule ^mm5/admin.mvc? - [L]
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^myfolder/([^/.]+).html$ /mm5/merchant.mvc?Screen=CTGY&Category_code=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([^/.]+).html$ /mm5/merchant.mvc?Screen=$1 [L]

RewriteEngine On
RewriteRule ^([A-Za-z0-9_-]+)\.html$ /mm5/merchant.mvc?Screen=USL&Code=$1 [T=application/x-httpd-mv]
RewriteRule ^([A-Za-z0-9_-]+)\.html$ /mm5/merchant.mvc?Screen=USL&Code=$1 [T=application/x-httpd-mv]
RewriteRule ^(.*)/(.*)\.html$ /mm5/merchant.mvc?Screen=USL&Code=$1 [L]
RewriteRule ^(.*)\.html$ /mm5/merchant.mvc?Screen=USL&Code=$1 [L]
#this is to redirect the homepage to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.net [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.mydomain.net/$1 [L,R=301]

Hoping someone will be able to help. I would really appreciate any help

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum