Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Excluding directory / IIS / two Domains Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
HamishB
Newbie
Newbie


Joined: 03 February 2008
Online Status: Offline
Posts: 4
Posted: 15 May 2008 at 1:05am | IP Logged Quote HamishB


I have a problem with excluding a sub directory in my re-write rules.

The website has two domains a .com and .com.au version set up on IIS. In the IIS administration panel there is a entry for the two domains pointing to the same directory. I can see the .htaccess code in the IIS administration panel fine, so it looks like it should be working ok.

For the .com.au version of the website the directory is excluded and working as I want.
for the .com version, the directory isn't being excluded.

I don't know if this is because there is essentially two websites setup pointing to the same directory on the file system, or some other issue.

my .htaccess file - I'm trying to exclude drillingfluids sub directory - specifically I want to be able to view .html files:

RewriteEngine On

RewriteRule ^(drillingfluids/) - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^midrilling/.*$ /resource-areas/mi-drilling-fluids.html [R=301,L]
RewriteRule ^midrilling/$ /resource-areas/mi-drilling-fluids.html [R=301,L]
RewriteRule ^greatideas/$ /resource-areas/great-ideas.html [R=301,L]
RewriteRule ^resource/$ /resource-areas.html [R=301,L]
#RewriteRule ^([^/]+)/$ /$1.html [R=301,L]
RewriteRule ^(.*)\.html index.php?q=/$1 [QSA,L]


The rest of it seems to work fine.

I also put in the "drillingfluids" directory a .htaccess file containing

RewriteEngine Off

and that doesnt work either.

Any suggestions?

Back to Top View HamishB's Profile Search for other posts by HamishB
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3934
Posted: 15 May 2008 at 2:42am | IP Logged Quote Anton

The config should be like this:

RewriteEngine On
RewriteBase /
RewriteRule ^.*drillingfluids.* - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^midrilling/.*$ resource-areas/mi-drilling-fluids.html [R=301,L]
RewriteRule ^greatideas/$ resource-areas/great-ideas.html [R=301,L]
RewriteRule ^resource/$ resource-areas.html [R=301,L]
#RewriteRule ^([^/]+)/$ /$1.html [R=301,L]
RewriteRule ^(.*)\.html index.php?q=/$1 [QSA,L]



__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
HamishB
Newbie
Newbie


Joined: 03 February 2008
Online Status: Offline
Posts: 4
Posted: 15 May 2008 at 2:48am | IP Logged Quote HamishB

Thanks for the reply

I still have the same problem, I think it is something to do with the wya the person managing the server has setup the two domains on the server.

 http://www.adgglobalsupply.com.au/drillingfluids/freetrial2.html

 http://www.adgglobalsupply.com/drillingfluids/freetrial2.html

i.e. those two websites both point to the same file system, same .htaccess file etc.

 

 

Back to Top View HamishB's Profile Search for other posts by HamishB
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3934
Posted: 16 May 2008 at 3:17am | IP Logged Quote Anton

Please provide rewrite log records for the non-working request.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
HamishB
Newbie
Newbie


Joined: 03 February 2008
Online Status: Offline
Posts: 4
Posted: 16 May 2008 at 3:24am | IP Logged Quote HamishB

Ok, well, I went to do that, and now it's working.

Perhaps the in correct version of the page was cached in my router/computer. THought I'm pretty sure I did a hard refresh.

So thanks for your help.. but it seems to be re-writing OK now.

 

Back to Top View HamishB's Profile Search for other posts by HamishB
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum