473,233 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,233 software developers and data experts.

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 2600
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********@musoswire.co.uk> wrote in message
news:e5**************@TK2MSFTNGP10.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.ServerVariables("Script_Na me"),
"default.asp", ""), "/", "")
Response.Redirect("/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.Redirect("/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********@musoswire.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.ServerVariables("Script_Na me"),
"default.asp", ""), "/", "")
Response.Redirect("/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.Redirect("/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********@musoswire.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********@musoswire.co.uk> wrote in message
news:e5**************@TK2MSFTNGP10.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********@musoswire.co.uk> wrote in message
news:eH**************@tk2msftngp13.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("Scripting.FileSystemObject")
Set Fldr = FSO.GetFolder(Server.MapPath("./")).SubFolders '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.Name, 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
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...
6
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...
2
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...
3
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==----...
5
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...
1
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...
5
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...
2
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...
11
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...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.