473,671 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

301 redirect like .htaccess

Hi everyone,

I'm trying to look for an asp equivilent of .htaccess that is used on apache
servers but for use with asp.

I am doing a website and moving lots of files into a single directory to
make it easier to maintain, however, I don't want to loose the search engine
indexing that is already in place.
What I would like to have is a db/.htacces-like files, that when a page
doesn't exist the server redirect.

I have found several options however, there seem to be pros and cons with
all of them so I am not sure what is the usual process for achieving what I
am trying to achieve. I don't have direct access to IIS.

1) Custom error 404 to catch all 'non existant' pages, run through db and d0
a 302 redirect (but this wouldn't index on search engines??)
2) Custom error 404 to catch all 'non existant' pages, run through db and d0
a 301 redirect (but would this not index the 404 as the new page)
3) JS redirect (yuck, wouldn't reindex on search engines and doesn't cover
non JS peps)
4) Meta refresh (I have read search engines ignore these)
5)Creating copies of current path files, insert a 301 code manually into
each, and redirect to the relevent page (cumbersome to maintain)
6)Create a single 'generic' file, renamed as per current paths, but have a
DB back end to do the 301 redirect after it's checked the DB (again
cumbersome to maintain, but it would work if I can put asp code before the
301)
7) Something I haven't considered - What could this be? - Something
generically doable in IIS (referencing a file) that I can send to the
hosting company perhaps?

Could you guys give me an insight to solutions tried and tested in ASP,
things which I haven't considered, bad and good practices. It may be a very
useful resource to others who are perhaps having similar problems finding a
solution as myself. What is considered the 'best practice', and be solution
considering the setup I have? Also, do 301 redirects reindex search engines
with the new _target_ path?

TIA
Stu

--

Jul 24 '06 #1
0 2088

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8921
by: | last post by:
This is an apache question (little off-topic) I have this .htaccess in web root -------------- ErrorDocument 404 /error404handler.php -------------- BUT I take in Mozilla this when I call a URL that dont exist: -------------------- Not Found The requested URL /this_dont_exist was not found on this server.
2
2673
by: Sean Pinto | last post by:
My hosting company has an automatic redirect page called /missing/missing.php and I want to log all of the page not founds that result in a redirection to missing.php. I can't seem to find out how to get the string that the web user typed to get there. I have checked $_SERVER but it has /missing/missing.php and $_SERVER is empty. Does anyone know how to get "/abcdef" if the user navigated to "http://mydomain.com/abcdef" ? Any help is...
7
16709
by: Tim Evans | last post by:
I'm using a meta-refresh construct to redirect a URL: <meta http-equiv="REFRESH" content="0;url=http://path/to/new/url"> I would like to be able to make this open in a new window, rather than in the current window. Suggestions? Thanks.
3
2127
by: Vardan Kushnir | last post by:
Please forgive me if my English is poor. Also please tell me if this is wrong place to ask this question and tell me better place. When searching web for information Re: .htaccess and redirecting, I see many different examples of methods. I wish to be able to say "this is good method that I can always use" even if exists other good methods. I wish not be confused by many different examples of methods.
5
4995
by: deko | last post by:
I'm trying to redirect requests for /index.php to /mydirectory/index.php If I use an index file in / with only this line: <?php header("Location:http://www.mysite.com/mydirectory/"); ?> that seems to work. But can this be accomplished more efficiently with an htaccess rewrite?
2
3640
by: =?ISO-8859-1?Q?Fran=E7ois_de_Dardel?= | last post by:
I am not sure if this is the proper forum, but I always found very helpful information here and I would like to have the advice of experts. Just before new year (end Dec 2006), my internet provided (noos.fr) had trouble with ftp, so that access to my web pages became very problematic, mostly impossible. After 2 months and many unanswered complaints, I decided to buy my own domain, subscribe with a different host and transfer all my files...
8
5138
by: howa | last post by:
a page currently in HTTPS, I force the client to redirect to another page using HTTP under the same domain (e.g. abc.com), i.e. header("Location: http://www.abc.com/index.php"); IE successfully redirect to HTTP, but FF & Opera stay on the HTTPS any suggestions?
2
1780
by: RuthC | last post by:
Hi. I am using .htaccess to redirect in my website Now I want to redirect a url, which Contain '-' to another url. ex: RewriteRule ^book-and-magazine-discount/ query.php?q=$1.
2
3740
by: RuthC | last post by:
Hi, In my website there is a facility for user to create there own pages we are maintaing this url as www.mywebsite.com/mypage/user created page name ex : www.mywebsite.com/mypage/ruth user created page name can contain alphanumeric charecters including '_' (no white space) I am using this code to redirect the user created pages RewriteRule ^mypage/(.*)/ mypage.php?u=$1
0
8393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8914
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8598
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6223
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5695
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2810
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.