redirect all to default page

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 3
Joined: 22 Nov 2013, 17:46

redirect all to default page

22 Nov 2013, 18:07

I'm definitely full blown noob when it comes to editing the htaccess file. Monkey see/Monkey do and I'm fine. ;)

I have a site that where most pages were generated by a dbase, and they were in .php format. Site was hacked and was too much trouble to get the dev/team that the site was assigned to, to patch it up. I've pulled the whole site down, and it is now just a single page site.
Trying to make use of what traffic may still be available.

My goal is to have any and all page requests, simply resolve to the default.aspx home page (with a 301 if possible). I have this partially working after spending the last few hours looking at posts and google searches.

Pages with a straight page name or subfolder/pagename like this are redirecting fine: http://www.rapidrestore.net/fire-smoke-soot/maryland

Pages with a "+" in the url are still landing on a 404:
http://www.rapidrestore.net/flood-water ... storations

Current rule in place:
# Redirect all traffic to one page
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/default.aspx
RewriteCond %{REQUEST_URI} ^(?!(.*\.(?:gif|jpg|png|css|js)$)).*$
RewriteRule .? /default.aspx [NC,R=301]

Any feedback is greatly appreciated!

Regards,
Mark

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: redirect all to default page

25 Nov 2013, 17:28

Hello,

I think it's rather IIS and Helicon issue. Take a look - http://serverfault.com/questions/76013/ ... t-querystr

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 13 guests