catch all rule
2 posts
• Page 1 of 1
catch all rule
Hello All,
I have a number of rules within my .htaccess file (see extract below). What im looking to do is add a new rule that would allow some kind of catch all. If none of the above rules have been matched, I would like to send a user to another page
RewriteRule ^([A-Za-z0-9-]+).html$ main.aspx?pagename=$1 [L,QSA]
#CATCHALL HERE:
catchapp.aspx
How would I go about achieving this?
I have a number of rules within my .htaccess file (see extract below). What im looking to do is add a new rule that would allow some kind of catch all. If none of the above rules have been matched, I would like to send a user to another page
RewriteRule ^([A-Za-z0-9-]+).html$ main.aspx?pagename=$1 [L,QSA]
#CATCHALL HERE:
catchapp.aspx
How would I go about achieving this?
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: catch all rule
Hello,
Well, you use a rule at the bottom of your .htaccess that would state:
Regards
Andrew
Well, you use a rule at the bottom of your .htaccess that would state:
- Code: Select all
RewriteRule .* /catchapp.aspx [NC,R=301,L]
Regards
Andrew
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests