| Author |
|
cdsouza Newbie

Joined: 12 May 2011 Location: United States
Online Status: Offline Posts: 7
|
| Posted: 12 May 2011 at 8:44pm | IP Logged
|
|
|
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 |
|
| |
cdsouza Newbie

Joined: 12 May 2011 Location: United States
Online Status: Offline Posts: 7
|
| Posted: 13 May 2011 at 3:47pm | IP Logged
|
|
|
nobody huh?
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 16 May 2011 at 8:02am | IP Logged
|
|
|
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 |
|
| |
cdsouza Newbie

Joined: 12 May 2011 Location: United States
Online Status: Offline Posts: 7
|
| Posted: 16 May 2011 at 11:06am | IP Logged
|
|
|
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 |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 17 May 2011 at 5:34am | IP Logged
|
|
|
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 |
|
| |
cdsouza Newbie

Joined: 12 May 2011 Location: United States
Online Status: Offline Posts: 7
|
| Posted: 17 May 2011 at 12:50pm | IP Logged
|
|
|
V3. Thank you, much appreciated.
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 18 May 2011 at 4:55am | IP Logged
|
|
|
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 |
|
| |
cdsouza Newbie

Joined: 12 May 2011 Location: United States
Online Status: Offline Posts: 7
|
| Posted: 18 May 2011 at 6:14pm | IP Logged
|
|
|
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 |
|
| |
cdsouza Newbie

Joined: 12 May 2011 Location: United States
Online Status: Offline Posts: 7
|
| Posted: 18 May 2011 at 6:53pm | IP Logged
|
|
|
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 |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 19 May 2011 at 6:26am | IP Logged
|
|
|
Than make it this way:
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^/(.+)$ /$1/index.aspx [NC,R=301,L]
|
| Back to Top |
|
| |
cdsouza Newbie

Joined: 12 May 2011 Location: United States
Online Status: Offline Posts: 7
|
| Posted: 19 May 2011 at 12:51pm | IP Logged
|
|
|
Okay. I used above but it does not seem to do anything at all?
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 25 May 2011 at 3:25am | IP Logged
|
|
|
Please, provide the rewrite.log for the testing request.
Logging issues described in FAQ
Regards
Andrew
|
| Back to Top |
|
| |