Redirect all requests for .aspx pages to one page
4 posts
• Page 1 of 1
Redirect all requests for .aspx pages to one page
Hello, with ISRW 3, how can I redirect requests for any page ending in .aspx to a single page that is not an aspx page?
Thanks,
CXL
Thanks,
CXL
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Redirect all requests for .aspx pages to one page
Try using:
Regards
- Code: Select all
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REUQEST_URI} \.aspx$
RewriteRule (.+) /any/other/Non/aspx/page [NC,R=301,L]
Regards
Re: Redirect all requests for .aspx pages to one page
Is there any downside to using this or a reason not to?
RewriteRule ^(.*?.aspx) /hello.html [I]
RewriteRule ^(.*?.aspx) /hello.html [I]
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Redirect all requests for .aspx pages to one page
I can see only one - [L]flag. But it's really up to you. If you have other rules below this one, it will save time and requests wouldn't go down the config file.
Regards
- Code: Select all
RewriteRule ^(.*?.aspx) /hello.html [NC,L]
Regards
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 19 guests