...

View Full Version : redirect an entire subdirectory?



bodymoves
10-01-2007, 11:09 PM
i'm dealing with asp pages on a IIS server so, using the lovely .htaccess is out of the question.

i also don't have root level access to the Internet Services Manager and i was trying to avoid having to go into each and every single page within the directory to add redirect code.

has anyone done this before? any advice is greatly appreciated.

Daemonspyre
10-02-2007, 01:15 PM
Since you don't have the 'administrative' access that you need to do this, you can simply change the index.asp file to do the redirect.

If you have other pages that can be manually navigated (i.e., no security checking on your pages), you may have to do this on every single page.

My suggestion: FIND AND REPLACE. Find something that is in every page (<html> for example) and replace it with <% response.redirect("/path/to/folder/") %><html>.

nikkiH
10-02-2007, 02:43 PM
Move all the files that are there somewhere else so they get a 404.
Use a custom 404 page to redirect.

If you only use index.asp, it won't trap bookmarked pages or old links and users will still see them.

bodymoves
10-03-2007, 12:02 AM
do i have to have access to the Internet Services Manager to customize and set a 404 page?


Move all the files that are there somewhere else so they get a 404.
Use a custom 404 page to redirect.

If you only use index.asp, it won't trap bookmarked pages or old links and users will still see them.

Daemonspyre
10-03-2007, 01:04 PM
Yes, which is why I didn't suggest that at the beginning ( nikki :) ).

Custom Error pages ( done in IIS under WebSite > Properties > Custom Error Pages ) require access to the site in IIS.

Since you said you didn't have access to IIS, this became a moot point.

nikkiH
10-03-2007, 02:18 PM
Custom Error pages ( done in IIS under WebSite > Properties > Custom Error Pages ) require access to the site in IIS.

Good to know. :D
I've always had those already set up.
If I didn't, I'd sure be pestering the admin / host to set that up. I think those are important.

But just changing index.asp won't affect all the other pages in the site, and bookmarks and old links won't redirect.

Daemonspyre
10-03-2007, 03:26 PM
You are correct that just changing the index.asp >> redirect will not fix things like bookmarks and other pages, which is why I said to use FIND AND REPLACE.

Since I do mostly secure pages, I use multiple checks and balances so I can use the index.asp >> redirect (i.e. IF (you can't pass my security checks) THEN redirect to INDEX) END IF, INDEX >> REDIRECT Another Page).

nikkiH
10-03-2007, 06:58 PM
Very cool. :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum