[HCoop-Discuss] domtool and rewrite rules.

Steve Johnson srj at adnd.com
Thu Jan 31 14:42:45 EST 2008


Hi,

I'm having trouble converting a set of re-write rules over to domtool,
can someone help me out here? Been working on it for a while, with no
luck.

here are the rewrite rules that I need:

  RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^(.*)$ - [L]

  # Check for Santy Worms and redirect them to a fail page
  #-------------------------------------------------------------------
  # Variant -1
  # uncomment if you dont use LWP
  # RewriteCond %{HTTP_USER_AGENT} ^LWP             [NC,OR]
  # Variant -2
  RewriteCond %{REQUEST_URI} ^visualcoders                [NC,OR]
  # Variant -3
  RewriteCond %{QUERY_STRING} rush=([^&]+)                [NC]
  # deny them
  RewriteRule ^.*$ - [F]
  #-------------------------------------------------------------------

  # if you use LEO and CPG-Nuke is installed in a sub-directory like '/html',
  # remove that # before RewriteBase and rename /html to the path of
the sub-directory
  # RewriteBase /html
  # RewriteRule ^index\.html /index.php
  RewriteRule ^([a-zA-Z0-9_=+-]+)(/|\.html)$ index=$1 [L,S=5]
  RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)(/|\.html)$
index=$1&file=$2 [L,S=4]
  RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index=$1&file=$2 [L,S=3]
  RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(.*)(/|\.html)$
index=$1&file=$2&$3 [L,S=1]
  RewriteRule ^([a-zA-Z0-9_]+)/(.*)(/|\.html)$ index=$1&file=index&$2  [L]
  RewriteRule ^index=(.*[^/])/(.*) index=$1&$2 [N,L]
  RewriteRule ^index=(.*) index.php?name=$1 [L]

## End of rules

Any help would be greatly appreciated.  These rules work perfectly in
my .htaccess on another provider, I just can't seem to figure out how
to make them work in domtool.

My main issues are, I can not figure out how to do a rewriteCond, and
I also can not figure out how to have more than one option at the end
of the rule.

Thanks for any help.

-Steve


-- 
Blog - http://www.fratm.com/index.php/User:Fratm
"Knowing others is wisdom, knowing your self is Enlightenment." - Lao-Tzu



More information about the HCoop-Discuss mailing list