Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

httpd.ini - What code to use? How to use this file for redirects?

Featured Replies

I am working on my clients websites. The are issues with the httpd.ini file, this is supposed to redirect automatically visitors to the old web pages onto the new pages. But its not working.

Can anyone give advice on how to use this correctly? The redirects at the top (subdomain redirects) work, but the redirects further down (ISAPI_Rewrite) don't

Any advice welcome as this is an area I don't know much about.

Kind Regards

Rich

 

The code in the file is:

 

[iSAPI_Rewrite]

 

### subdomain redirect v2 ###

RewriteCond Host: (?:.+\.)?ronwheelocksayahuascacenter\.com

RewriteCond URL ^/elpurguero/(.*)

RewriteCond METHOD GET

RewriteRule ^/elpurguero/(.*) /$1 [i,R]

RewriteCond Host: (?:.+\.)?ronwheelocksayahuascacenter\.com

RewriteCond METHOD POST

RewriteRule ^/elpurguero/(.*) /$1

RewriteCond Host: (?:.+\.)?ronwheelocksayahuascacenter\.com

RewriteRule (.*) /elpurguero/$1 [i,L]

 

### subdomain redirect v2 ###

RewriteCond Host: (?:.+\.)?ablazegraphics\.co\.uk

RewriteCond URL ^/ablazegraphics/(.*)

RewriteCond METHOD GET

RewriteRule ^/ablazegraphics/(.*) /$1 [i,R]

RewriteCond Host: (?:.+\.)?ablazegraphics\.co\.uk

RewriteCond METHOD POST

RewriteRule ^/ablazegraphics/(.*) /$1

RewriteCond Host: (?:.+\.)?ablazegraphics\.co\.uk

RewriteRule (.*) /ablazegraphics/$1 [i,L]

 

### subdomain redirect v2 ###

RewriteCond Host: (?:.+\.)?revoltingmass\.com

RewriteCond URL ^/revoltingmass/(.*)

RewriteCond METHOD GET

RewriteRule ^/revoltingmass/(.*) /$1 [i,R]

RewriteCond Host: (?:.+\.)?revoltingmass\.com

RewriteCond METHOD POST

RewriteRule ^/revoltingmass/(.*) /$1

RewriteCond Host: (?:.+\.)?revoltingmass\.com

RewriteRule (.*) /revoltingmass/$1 [i,L]

 

### subdomain redirect v2 ###

RewriteCond Host: (?:.+\.)?punkdesign\.co\.uk

RewriteCond URL ^/punkdesign/(.*)

RewriteCond METHOD GET

RewriteRule ^/punkdesign/(.*) /$1 [i,R]

RewriteCond Host: (?:.+\.)?punkdesign\.co\.uk

RewriteCond METHOD POST

RewriteRule ^/punkdesign/(.*) /$1

RewriteCond Host: (?:.+\.)?punkdesign\.co\.uk

RewriteRule (.*) /punkdesign/$1 [i,L]

 

### subdomain redirect v2 ###

RewriteCond Host: (?:.+\.)?masonuk\.de

RewriteCond URL ^/(.*)

RewriteCond METHOD GET

RewriteRule ^/(.*) /$1 [i,L]

RewriteCond Host: (?:.+\.)?masonuk\.de

RewriteCond METHOD POST

RewriteRule ^/(.*) /$1

RewriteCond Host: (?:.+\.)?masonuk\.de

RewriteRule (.*) /$1 [i,L]

 

### subdomain redirect v2 ###

RewriteCond Host: (?:.+\.)?masonuk\.se

RewriteCond URL ^/dk/(.*)

RewriteCond METHOD GET

RewriteRule ^/dk/(.*) /$1 [i,R]

RewriteCond Host: (?:.+\.)?masonuk\.se

RewriteCond METHOD POST

RewriteRule ^/dk/(.*) /$1

RewriteCond Host: (?:.+\.)?masonuk\.se

RewriteRule (.*) /dk/$1 [i,L]

 

### subdomain redirect v2 ###

RewriteCond Host: (?:.+\.)?masonuk\.it

RewriteCond URL ^/it/(.*)

RewriteCond METHOD GET

RewriteRule ^/it/(.*) /$1 [i,R]

RewriteCond Host: (?:.+\.)?masonuk\.it

RewriteCond METHOD POST

RewriteRule ^/it/(.*) /$1

RewriteCond Host: (?:.+\.)?masonuk\.it

RewriteRule (.*) /it/$1 [i,L]

 

### subdomain redirect v2 ###

RewriteCond Host: (?:.+\.)?masonuk\.dk

RewriteCond URL ^/dk/(.*)

RewriteCond METHOD GET

RewriteRule ^/dk/(.*) /$1 [i,R]

RewriteCond Host: (?:.+\.)?masonuk\.dk

RewriteCond METHOD POST

RewriteRule ^/dk/(.*) /$1

RewriteCond Host: (?:.+\.)?masonuk\.dk

RewriteRule (.*) /dk/$1 [i,L]

 

### subdomain redirect v2 ###

RewriteCond Host: (?:.+\.)?masonuk\.es

RewriteCond URL ^/es/(.*)

RewriteCond METHOD GET

RewriteRule ^/es/(.*) /$1 [i,R]

RewriteCond Host: (?:.+\.)?masonuk\.es

RewriteCond METHOD POST

RewriteRule ^/es/(.*) /$1

RewriteCond Host: (?:.+\.)?masonuk\.es

RewriteRule (.*) /es/$1 [i,L]

 

[iSAPI_Rewrite]

RewriteRule /floatingfloors\.html http\://www.mason-uk.co.uk/floatingfloors.asp [i,O,RP]

RewriteRule /products\.html http\://www.mason-uk.co.uk/vibration-control-products\.asp [i,O,RP]

RewriteRule /acoustic-vibration-control\.html http\://www.mason-uk.co.uk/acoustic-engineering-services.asp [i,O,RP]

RewriteRule /index\.html http\://www.mason-uk.co.uk/index.asp [i,O,RP]

RewriteRule /pages/index\.html http\://mason-uk.co.uk/index.asp [i,RP]

RewriteRule /pages/001s\.html http\://mason-uk.co.uk/photos.asp?pid=382 [i,RP]

RewriteRule /pages/006s\.html http\://mason-uk.co.uk/photos.asp?pid=382 [i,RP]

RewriteRule /pages/airspring1\.html http\://mason-uk.co.uk/basket.asp?pid=428 [i,RP]

RewriteRule /pages/airspring2\.html http\://mason-uk.co.uk/basket.asp?pid=428 [i,RP]

RewriteRule /pages/airspring3\.html http\://mason-uk.co.uk/basket.asp?pid=428 [i,RP]

RewriteRule /pages/airspring4\.html http\://mason-uk.co.uk/basket.asp?pid=428 [i,RP]

RewriteRule /pages/airspring5\.html http\://mason-uk.co.uk/basket.asp?pid=428 [i,RP]

RewriteRule /pages/airspring6\.html http\://mason-uk.co.uk/basket.asp?pid=428 [i,RP]

RewriteRule /pages/airspring7\.html http\://mason-uk.co.uk/basket.asp?pid=428 [i,RP]

RewriteRule /pages/airsprings\.html http\://mason-uk.co.uk/basket.asp?pid=428 [i,RP]

RewriteRule /pages/basephoto\.html http\://mason-uk.co.uk/basket.asp?pid=401 [i,RP]

RewriteRule /pages/bases\.html http\://mason-uk.co.uk/basket.asp?pid=401 [i,RP]

RewriteRule /pages/basket\.asp http\://mason-uk.co.uk/index.asp [i,RP]

RewriteRule /pages/ceilings\.html http\://mason-uk.co.uk/acoustic-suspended-ceilings.asp [i,RP]

RewriteRule /pages/company\.html http\://mason-uk.co.uk/about-mason-uk.asp [i,RP]

RewriteRule /pages/ceilings\.html http\://mason-uk.co.uk/acoustic-suspended-ceilings.asp [i,RP]

RewriteRule /pages/concrete\.html http\://mason-uk.co.uk/photos.asp?pid=382 [i,RP]

RewriteRule /pages/contacting\.asp http\://mason-uk.co.uk/contact.asp [i,RP]

RewriteRule /pages/dnsaphoto\.html http\://mason-uk.co.uk/acoustically-isolated-walls.asp [i,RP]

RewriteRule /pages/dnsbphoto\.html http\://mason-uk.co.uk/acoustically-isolated-walls.asp [i,RP]

RewriteRule /pages/end\.html http\://mason-uk.co.uk/photos.asp?pid=382 [i,RP]

RewriteRule /pages/hangerphoto\.html http\://mason-uk.co.uk/acoustic-suspended-ceilings.asp [i,RP]

RewriteRule /pages/hangers\.html http\://mason-uk.co.uk/acoustic-suspended-ceilings.asp [i,RP]

RewriteRule /pages/home\.html http\://mason-uk.co.uk/index.asp [i,RP]

RewriteRule /pages/isolate\.html http\://mason-uk.co.uk/isolation-bearings.asp [i,RP]

RewriteRule /pages/isolate1\.html http\://mason-uk.co.uk/isolation-bearings.asp [i,RP]

RewriteRule /pages/isolate2\.html http\://mason-uk.co.uk/isolation-bearings.asp [i,RP]

RewriteRule /pages/isolate3\.html http\://mason-uk.co.uk/isolation-bearings.asp [i,RP]

RewriteRule /pages/isolate4\.html http\://mason-uk.co.uk/isolation-bearings.asp [i,RP]

RewriteRule /pages/isolate5\.html http\://mason-uk.co.uk/isolation-bearings.asp [i,RP]

RewriteRule /pages/isolate6\.html http\://mason-uk.co.uk/isolation-bearings.asp [i,RP]

RewriteRule /pages/isolatepics\.html http\://mason-uk.co.uk/isolation-bearings.asp [i,RP]

RewriteRule /pages/jackup\.html http\://mason-uk.co.uk/basket.asp?pid=382 [i,RP]

RewriteRule /pages/links\.html http\://mason-uk.co.uk/links.asp

RewriteRule /pages/manc11\.html http\://mason-uk.co.uk/basket.asp?pid=383 [i,RP]

RewriteRule /pages/manc22\.html http\://mason-uk.co.uk/basket.asp?pid=383 [i,RP]

RewriteRule /pages/manc33\.html http\://mason-uk.co.uk/basket.asp?pid=383 [i,RP]

RewriteRule /pages/manc44\.html http\://mason-uk.co.uk/basket.asp?pid=383 [i,RP]

RewriteRule /pages/manc55\.html http\://mason-uk.co.uk/basket.asp?pid=383 [i,RP]

RewriteRule /pages/manc66\.html http\://mason-uk.co.uk/basket.asp?pid=383 [i,RP]

RewriteRule /pages/martin\.html http\://mason-uk.co.uk/basket.asp?pid=383 [i,RP]

RewriteRule /pages/mount\.html http\://mason-uk.co.uk/isolated-rubber-mounts-pads.asp [i,RP]

RewriteRule /pages/mounts\.html http\://mason-uk.co.uk/basket.asp?pid=382 [i,RP]

RewriteRule /pages/neophotos\.html http\://mason-uk.co.uk/basket.asp?pid=383 [i,RP]

RewriteRule /pages/neoprene\.html http\://mason-uk.co.uk/basket.asp?pid=383 [i,RP]

RewriteRule /pages/neoprenehangers\.html http\://mason-uk.co.uk/neoprene-hangers.asp [i,RP]

RewriteRule /pages/news\.asp http\://mason-uk.co.uk/news.asp [i,RP]

RewriteRule /pages/npsphoto\.html http\://mason-uk.co.uk/acoustically-isolated-walls.asp [i,RP]

RewriteRule /pages/past\.asp http\://mason-uk.co.uk/projects.asp [i,RP]

RewriteRule /pages/pipe\.html http\://mason-uk.co.uk/flexible-pipe-connectors.asp [i,RP]

RewriteRule /pages/Spring\.html http\://mason-uk.co.uk/basket.asp?pid=382 [i,RP]

RewriteRule /pages/spring2\.html http\://mason-uk.co.uk/isolated-spring-mounts.asp [i,RP]

RewriteRule /pages/springhangers\.html http\://mason-uk.co.uk/spring-hangers.asp [i,RP]

RewriteRule /pages/sprphotos\.html http\://mason-uk.co.uk/basket.asp?pid=382 [i,RP]

RewriteRule /pages/susphotos\.html http\://mason-uk.co.uk/acoustic-suspended-ceilings.asp [i,RP]

RewriteRule /pages/swood\.html http\://mason-uk.co.uk/basket.asp?pid=440 [i,RP]

RewriteRule /pages/swood11\.html http\://mason-uk.co.uk/basket.asp?pid=440 [i,RP]

RewriteRule /pages/swood22\.html http\://mason-uk.co.uk/basket.asp?pid=440 [i,RP]

RewriteRule /pages/swood33\.html http\://mason-uk.co.uk/basket.asp?pid=440 [i,RP]

RewriteRule /pages/swood44\.html http\://mason-uk.co.uk/basket.asp?pid=440 [i,RP]

RewriteRule /pages/swwphoto\.html http\://mason-uk.co.uk/acoustically-isolated-walls.asp [i,RP]

RewriteRule /pages/team\.html http\://mason-uk.co.uk/basket.asp?pid=382 [i,RP]

RewriteRule /pages/tech\.html http\://mason-uk.co.uk/index.asp [i,RP]

RewriteRule /pages/thanx\.asp http\://mason-uk.co.uk/contact.asp [i,RP]

RewriteRule /pages/unknown\.html http\://mason-uk.co.uk/basket.asp?pid=440 [i,RP]

RewriteRule /pages/walls\.html http\://mason-uk.co.uk/acoustically-isolated-walls.asp [i,RP]

RewriteRule /pages/wicphoto\.html http\://mason-uk.co.uk/acoustically-isolated-walls.asp [i,RP]

RewriteRule /pages/wicsmphoto\.html http\://mason-uk.co.uk/acoustically-isolated-walls.asp [i,RP]

RewriteRule /pages/wooden\.html http\://mason-uk.co.uk/basket.asp?pid=440 [i,RP]

  • Author

I think that the .htaccess file is used for Linux servers. Unfortunately this website is on Windows servers, so I think you use the httpd.ini file

Sorry got the wrong end of the stick :)

 

You can use .htaccess on Windows Servers, though it may be limited to when using PHP, I'm not sure.

 

As for your Window specific issue don;t you need to declare "RewriteEngine on"?

 

I also see you have various forward slashes in page names, eg /floatingfloors\.html - is that correct for IIS?

 

http://www.helicontech.com/isapi_rewrite/doc/examples.htm seems to have some examples and docs?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.