473,800 Members | 2,227 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

auto redirect from diretory url

Hi

Subject line doesn't make sense I know. Basically we have a number of people
on our system. They can sign up automatically and create their page.

What I want to be able to do is give them their own url (eg.
www.mydomain.com/theirsite).

Because they can sign up without our interference, I need some way of
creating a directory, with an index page that goes to their site, or some
way of mydomain.com's index.asp reading the "/theirsite" and redirected to
wherever it needs to go (viewartist.asp ?id=them). Is that possible or will
the web browser always try and go to a the "/theirsite" directory?

Thanks for your help!
Dan
Jul 19 '05 #1
5 2621
Use a custom 404 for this. http://www.aspfaq.com/show.asp?id=2162 Just be
sure to restrict any names of directories you use or may possibly want to
use in the future. Like, don't let someone create an account with "images"
as his name or something.

Ray at work

"Dan Nash" <da********@mus oswire.co.uk> wrote in message
news:e5******** ******@TK2MSFTN GP10.phx.gbl...
Hi

Subject line doesn't make sense I know. Basically we have a number of people on our system. They can sign up automatically and create their page.

What I want to be able to do is give them their own url (eg.
www.mydomain.com/theirsite).

Because they can sign up without our interference, I need some way of
creating a directory, with an index page that goes to their site, or some
way of mydomain.com's index.asp reading the "/theirsite" and redirected to
wherever it needs to go (viewartist.asp ?id=them). Is that possible or will
the web browser always try and go to a the "/theirsite" directory?

Thanks for your help!
Dan

Jul 19 '05 #2

I have a similar project for users ...

I use ASP to create the directory, and copy a defualt.asp file of mine
into it ... the asp file goes something like ...

-- default.asp --

<%
Dim userName
userName = Replace(Replace (Request.Server Variables("Scri pt_Name"),
"default.as p", ""), "/", "")
Response.Redire ct("/viewartist.asp? userid=" & userName)
%>
OR BETTER YET ... ANOTHER PROJECT I HAVE WORKED ON

I just wrote the asp file upon user creation

<%
'// Code to create directory

'// Code to write a new asp file
%>

-- default.asp --

<%
Response.Redire ct("/viewartist.asp? userid=123456")
%>
This second solution is better ... just when you create the user
account make sure that their name is not in the list of folders you
are using for site creation ... what I always do is just have all of
my folders start with an underscore ... and not allow any usernames to
start with an underscore ... with username validation this is a sinch
.... AND it keeps your folders alphabetically first for easy sorting.

just a thought ... I haven't tried using the 404 ... but would be
nervous doing so ... besides ... if they have images or anything ....
you can do what I did and create

/username/images/
/username/statictextdata/

Another thing I did ...
I kept all of their data in the database, but wrote other parts to
their statictextdata folder so the database wasn't being hit all the
time for viewing.

I almost ALWAYS do this for my advanced shopping systems. products are
ADDED, UPDATED, DELETED ... MUCH MUCH less than SELECTED

In my shopping systems I generally have all products in a database,
have it where they can be added to, updated, deleted through a UI ...
then have a button to "SEND CHANGES TO WEBSITE" ((althought
technically they are on a website .. their extranet.
Then, send changes writes over the products in a textdata/products/
folder ... usallly in the form of FULL pages of products html

Anyway ... too much info ... sorry


On Thu, 8 Jan 2004 12:32:20 -0000, "Dan Nash"
<da********@mus oswire.co.uk> wrote:
Hi

Subject line doesn't make sense I know. Basically we have a number of people
on our system. They can sign up automatically and create their page.

What I want to be able to do is give them their own url (eg.
www.mydomain.com/theirsite).

Because they can sign up without our interference, I need some way of
creating a directory, with an index page that goes to their site, or some
way of mydomain.com's index.asp reading the "/theirsite" and redirected to
wherever it needs to go (viewartist.asp ?id=them). Is that possible or will
the web browser always try and go to a the "/theirsite" directory?

Thanks for your help!
Dan


Jul 19 '05 #3
Although, the 404 redirect seems to be working fine for aspfaq.com I
may have to play with it.

But my way will work if you do not have access to manipulate the 404
... which some providers don't give (the bad evil ones )

On Thu, 08 Jan 2004 17:41:33 GMT, z@z.com (Brynn) wrote:

I have a similar project for users ...

I use ASP to create the directory, and copy a defualt.asp file of mine
into it ... the asp file goes something like ...

-- default.asp --

<%
Dim userName
userName = Replace(Replace (Request.Server Variables("Scri pt_Name"),
"default.asp ", ""), "/", "")
Response.Redir ect("/viewartist.asp? userid=" & userName)
%>
OR BETTER YET ... ANOTHER PROJECT I HAVE WORKED ON

I just wrote the asp file upon user creation

<%
'// Code to create directory

'// Code to write a new asp file
%>

-- default.asp --

<%
Response.Redir ect("/viewartist.asp? userid=123456")
%>
This second solution is better ... just when you create the user
account make sure that their name is not in the list of folders you
are using for site creation ... what I always do is just have all of
my folders start with an underscore ... and not allow any usernames to
start with an underscore ... with username validation this is a sinch
... AND it keeps your folders alphabetically first for easy sorting.

just a thought ... I haven't tried using the 404 ... but would be
nervous doing so ... besides ... if they have images or anything ....
you can do what I did and create

/username/images/
/username/statictextdata/

Another thing I did ...
I kept all of their data in the database, but wrote other parts to
their statictextdata folder so the database wasn't being hit all the
time for viewing.

I almost ALWAYS do this for my advanced shopping systems. products are
ADDED, UPDATED, DELETED ... MUCH MUCH less than SELECTED

In my shopping systems I generally have all products in a database,
have it where they can be added to, updated, deleted through a UI ...
then have a button to "SEND CHANGES TO WEBSITE" ((althought
technically they are on a website .. their extranet.
Then, send changes writes over the products in a textdata/products/
folder ... usallly in the form of FULL pages of products html

Anyway ... too much info ... sorry


On Thu, 8 Jan 2004 12:32:20 -0000, "Dan Nash"
<da********@mu soswire.co.uk> wrote:
Hi

Subject line doesn't make sense I know. Basically we have a number of people
on our system. They can sign up automatically and create their page.

What I want to be able to do is give them their own url (eg.
www.mydomain.com/theirsite).

Because they can sign up without our interference, I need some way of
creating a directory, with an index page that goes to their site, or some
way of mydomain.com's index.asp reading the "/theirsite" and redirected to
wherever it needs to go (viewartist.asp ?id=them). Is that possible or will
the web browser always try and go to a the "/theirsite" directory?

Thanks for your help!
Dan


Jul 19 '05 #4
Hi Guys

Thanks a lot for your replies. Some interesting ideas...

I'm gonna have a go with the 404 idea first of all, for two reasons...

1) I do have 404 access (I think)

and 2) it would take me a whole day to rename all the directories with a "_"
in front. I will however do that by standard in all future websites, in case
I ever need to do something with directories!!

Thanks again, and I'll be back if I have any trouble!! :o)
"Dan Nash" <da********@mus oswire.co.uk> wrote in message
news:e5******** ******@TK2MSFTN GP10.phx.gbl...
Hi

Subject line doesn't make sense I know. Basically we have a number of people on our system. They can sign up automatically and create their page.

What I want to be able to do is give them their own url (eg.
www.mydomain.com/theirsite).

Because they can sign up without our interference, I need some way of
creating a directory, with an index page that goes to their site, or some
way of mydomain.com's index.asp reading the "/theirsite" and redirected to
wherever it needs to go (viewartist.asp ?id=them). Is that possible or will
the web browser always try and go to a the "/theirsite" directory?

Thanks for your help!
Dan

Jul 19 '05 #5
Dan Nash <da********@mus oswire.co.uk> wrote in message
news:eH******** ******@tk2msftn gp13.phx.gbl...
Hi Guys

Thanks a lot for your replies. Some interesting ideas...

I'm gonna have a go with the 404 idea first of all, for two reasons...

1) I do have 404 access (I think)

and 2) it would take me a whole day to rename all the directories with a "_" in front. I will however do that by standard in all future websites, in case I ever need to do something with directories!!

</snip>

Actually, it wouldn't take that long if you wrote a script to do it for you.

Pseudo code;

Dim FSO
Dim Fldr
Dim SubFldr

Set FSO = CreateObject("S cripting.FileSy stemObject")
Set Fldr = FSO.GetFolder(S erver.MapPath(" ./")).SubFold ers 'current
Folder

For Each SubFldr in Fldr
'whatever code you want to use (If/Then etc) to re-name them
'Something along the lines of the following should suffice
If Not Left(SubFldr.Na me, 1) = "_" Then
SubFldr.Name = "_" & SubFldr.Name
End If
Next

Set FSO = Nothing
Set Fldr = Nothing
Set SubFldr = Nothing

I've not checked this as I don't have time right now, so you may want to
check it before running it.
--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Jul 19 '05 #6

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

Similar topics

2
7815
by: Robert Gordon | last post by:
I now realize I probably should have tried posting this on the IIS board first.. I am running OWA 2003 Server as Front End server to my Exchange 2000 native domain. The FE server is secured by a 128 bit SSL cert. The OWA 2003 server is running on Windows 2003 server in a Windows 2003 native AD domain. At present, the server is configured so that user's have to specifically go to the URL httpS://myserver.company.com in order to access...
6
2249
by: mr_buggerlugs | last post by:
Any idea how i'd create a javascript which auto redirects to a specified url every 5 seconds until the url specified is reached? So if the url specified is redirected elsewhere it redirects to the specified url again and again until it reaches its destination.
2
2055
by: VB Programmer | last post by:
I created a page which I am using to prevent the user from hitting the BACK button. I'll call it my "Auto Jump" page. When it is called it basically auto-redirects to a page specified in the QueryString. (We'll call the page it goes to the "destination page".) If the user hits BACK on the destination page it should goto the "Auto Jump" page which should put you right back to where you hit the button. In Page_Load of this "Auto Jump"...
3
487
by: blu3g85 | last post by:
how to redirect a page? as in after a few sec, the page will auto direct u to another page. ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
5
7590
by: Josselin | last post by:
I have a page 'pni.php' to which paypal is redirecting after payment thsi page contains a db update script, no problem it's running well but once this script is executed (transparently for the use, as there is nothing to display) how can I redirect to another page ? header redirect can only be placed at the beginning of the page... not at the end I've already writen redirection but only when there was a form inside
1
1506
by: walkerhunter | last post by:
Hi all, I am trying to implement something called lightbox for creating modal forms on a webpage. Any way, I want to an auto redirect to occur, but I need the redirect to add in a parameter in addition to the URL. The way I have seen this parameter passed in is via a link like so: <a href="form.html" class="lbOn">Click here</a>
5
2921
by: Crumplezone | last post by:
I'm setting up a system in small museum where a number of web sites will be run locally on a PC with a touchscreen running (I assume) Windows & IE7. I need every page to have a timed redirect to the homepage, so that when a visitor leaves, everything will reset, ready for the next person. Which I can do OK with Javascript. I'd like to be able to warn people however, that the redirect is imminent. Some people may take too long to read the...
2
2195
by: bsmith | last post by:
Having a little problem with a project my boss gave me. We have a web based hosting site that we have multiple databases that the users can connect to. Right now we have it set up that they can choose the database they want to login to but he wants it to login to the only database the user is allowed to see. I have a login script that I am using on another project that works great by using redirect. The problem I have with the doing the same...
11
2647
by: vinceboy | last post by:
Hi..guys!I have a drop down menu with javascript null validation.However,instead of clicking submit button,it will immediately auto redirect after option was selected.Is it possible to prevent this kind of fast respond? <select name="rNumber" title="number of ticket" onChange="GoToNextPage(this.value)"> <option selected>Select</option> <option>01</option> ...
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
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
10505
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...
0
10275
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
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,...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
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
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.