Welcome to WebmasterWorld Guest from 23.20.64.96

Forum Moderators: ocean10000

Message Too Old, No Replies

Need help with httpd.ini file

,ini file rewrite

     
12:53 pm on Mar 3, 2016 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 4, 2001
posts:2196
votes: 26


My web host said I have to use a httpd.ini file for a rewrite rather than a web.config file and httpd.ini are far from my strong point. What I need is to get this
<rule name="Product Detail Page Match" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_URI}" negate="true" pattern="Contact-Us.*" />
<add input="{REQUEST_FILENAME}" negate="true" pattern="^Contact-Us.*" />
<add input="{URL}" pattern="\.asp" negate="true" />
<add input="{URL}" pattern="\.css" negate="true" />
<add input="{URL}" pattern="\.xml" negate="true" />
</conditions>
<action type="Rewrite" url="proddetail.asp?prod={UrlEncode:{R:1}}" />
</rule>
into this (actual domain name removed and replaced with "mydomain")
[ISAPI_Rewrite]
### subdomain redirect v2 ###RewriteRule ^/([^.?]+[^.?/])$ /$1/ [I,R=301]
### subdomain redirect v2 ###RewriteCond Host: (?:.+\.)?mydomain\.infoRewriteCond URL ^/mydomain.info-redirect/(.*)RewriteCond METHOD GETRewriteRule ^/mydomain.info-redirect/(.*) /$1 [I,R]RewriteCond Host: (?:.+\.)?mydomain\.infoRewriteCond METHOD POSTRewriteRule ^/mydomain.info-redirect/(.*) /$1 [I]
RewriteCond Host: (?:.+\.)?mydomain\.infoRewriteRule (.*) /mydomain.info-redirect/$1 [I,L]
### subdomain redirect v2 ###RewriteCond Host: (?:.+\.)?mydomain\.com
RewriteCond URL ^/(.*)RewriteCond METHOD GETRewriteRule ^/(.*) /$1 [I,L]
RewriteCond Host: (?:.+\.)?mydomain\.com
RewriteCond METHOD POST
RewriteRule ^/(.*) /$1 [I]RewriteCond Host: (?:.+\.)?mydomain\.comRewriteRule (.*) /$1 [I,L]
### subdomain redirect v2 ###RewriteCond Host: (?:.+\.)?mydomain\.coRewriteCond URL ^/(.*)
RewriteCond METHOD GETRewriteRule ^/(.*) /$1 [I,L]
RewriteCond Host: (?:.+\.)?mydomain\.coRewriteCond METHOD POSTRewriteRule ^/(.*) /$1 [I]
RewriteCond Host: (?:.+\.)?mydomain\.coRewriteRule (.*) /$1 [I,L]
### subdomain redirect v2 ###RewriteCond Host: (?:.+\.)?mydomain\.inRewriteCond URL ^/(.*)RewriteCond METHOD GETRewriteRule ^/(.*) /$1 [I,L]RewriteCond Host: (?:.+\.)?mydomain\.inRewriteCond METHOD POSTRewriteRule ^/(.*) /$1 [I]RewriteCond Host: (?:.+\.)?mydomain\.inRewriteRule (.*) /$1 [I,L]### subdomain redirect v2 ###RewriteCond Host: (?:.+\.)?mydomain\.usRewriteCond URL ^/(.*)RewriteCond METHOD GETRewriteRule ^/(.*) /$1 [I,L]RewriteCond Host: (?:.+\.)?mydomain\.usRewriteCond METHOD POSTRewriteRule ^/(.*) /$1 [I]RewriteCond Host: (?:.+\.)?mydomain\.usRewriteRule (.*) /$1 [I,L]### subdomain redirect v2 ###RewriteCond Host: (?:.+\.)?mydomain\.twRewriteCond URL ^/(.*)RewriteCond METHOD GETRewriteRule ^/(.*) /$1 [I,L]RewriteCond Host: (?:.+\.)?mydomain\.twRewriteCond METHOD POSTRewriteRule ^/(.*) /$1 [I]RewriteCond Host: (?:.+\.)?mydomain\.twRewriteRule (.*) /$1 [I,L]

I did some research on the internet, but to no avail. Any help would be appreciated.

Thanks in advance.
2:23 pm on Mar 5, 2016 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 4, 2001
posts:2196
votes: 26


Bump up.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members