This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Simple Rewrite - Please help! Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
cdsouza
Newbie
Newbie


Joined: 12 May 2011
Location: United States
Online Status: Offline
Posts: 7
Posted: 12 May 2011 at 8:44pm | IP Logged Quote cdsouza

So i have:
RewriteRule ^index.aspx$ / [R=301,L]

To force the domain to remove index.aspx.

But for all other folders and subfolders i want to add index.aspx.

Example: I want www.abc.com/folder/ to be www.abc.com/folder/index.aspx


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


Joined: 12 May 2011
Location: United States
Online Status: Offline
Posts: 7
Posted: 13 May 2011 at 3:47pm | IP Logged Quote cdsouza

nobody huh?
Back to Top View cdsouza's Profile Search for other posts by cdsouza
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 16 May 2011 at 8:02am | IP Logged Quote Guests

The rule you've provided is ISAPI_Rewrite 3 syntax, but your question is in ISAPI_Rewrite 2 forum.
Please clarify your version.

Regards
Andrew
Back to Top View Guests's Profile Search for other posts by Guests
 
cdsouza
Newbie
Newbie


Joined: 12 May 2011
Location: United States
Online Status: Offline
Posts: 7
Posted: 16 May 2011 at 11:06am | IP Logged Quote cdsouza

I want any folder except root to always have index.aspx.

For example, if someone enters www.abc.com/subfolder/

I want it to go to www.abc.com/subfolder/index.aspx

Same with www.abc.com/subfolder/subfolder2/
I want it go to to Same with www.abc.com/subfolder/subfolder2/index.aspx
Back to Top View cdsouza's Profile Search for other posts by cdsouza
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 17 May 2011 at 5:34am | IP Logged Quote Guests

Syntax for v2 is different from 3. Please, clarify your version, so I could provide you with the suitable rule.

Regards
Andrew
Back to Top View Guests's Profile Search for other posts by Guests
 
cdsouza
Newbie
Newbie


Joined: 12 May 2011
Location: United States
Online Status: Offline
Posts: 7
Posted: 17 May 2011 at 12:50pm | IP Logged Quote cdsouza

V3. Thank you, much appreciated. 
Back to Top View cdsouza's Profile Search for other posts by cdsouza
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 18 May 2011 at 4:55am | IP Logged Quote Guests

Hello,

Please, try using:

Code:
RewriteEngine on
#RewriteBase /

RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ /$1/index.aspx [NC,R=301,L]


Regards
Andrew
Back to Top View Guests's Profile Search for other posts by Guests
 
cdsouza
Newbie
Newbie


Joined: 12 May 2011
Location: United States
Online Status: Offline
Posts: 7
Posted: 18 May 2011 at 6:14pm | IP Logged Quote cdsouza

Thanks Andrew, I will give it a try.

And this won't affect my other rule,

RewriteRule ^index.aspx$ / [R=301,L]

??
Back to Top View cdsouza's Profile Search for other posts by cdsouza
 
cdsouza
Newbie
Newbie


Joined: 12 May 2011
Location: United States
Online Status: Offline
Posts: 7
Posted: 18 May 2011 at 6:53pm | IP Logged Quote cdsouza

So that was close but two issues.

One, I don't want to have this rule apply to root.

I want www.abc.com to remain as such.

The other issue is that www.abc.com/page translates fine, but www.abc.com/page/ translates to www.abc.com/page//index.aspx

An extra forward slash.
Back to Top View cdsouza's Profile Search for other posts by cdsouza
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 19 May 2011 at 6:26am | IP Logged Quote Guests

Than make it this way:

RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^/(.+)$ /$1/index.aspx [NC,R=301,L]
Back to Top View Guests's Profile Search for other posts by Guests
 
cdsouza
Newbie
Newbie


Joined: 12 May 2011
Location: United States
Online Status: Offline
Posts: 7
Posted: 19 May 2011 at 12:51pm | IP Logged Quote cdsouza

Okay. I used above but it does not seem to do anything at all?
Back to Top View cdsouza's Profile Search for other posts by cdsouza
 
Guests
Guest
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -149
Posted: 25 May 2011 at 3:25am | IP Logged Quote Guests

Please, provide the rewrite.log for the testing request.
Logging issues described in FAQ


Regards
Andrew
Back to Top View Guests's Profile Search for other posts by Guests
 

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 can vote in polls in this forum