473,396 Members | 1,942 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,396 software developers and data experts.

How to prevent duplicating webpage?

I have a webapp that allows users to delete/add content on a webpage.
The webpage is accessed like this:

www.abc.com/app/user1/
www.abc.com/app/user2/

where index.aspx is the default page. To do the above though requires
creating a new user subfolder, copying the index.aspx page from the app
folder and renaming it. This can be problematic when I need to update
templates.

www.abc.com/app/usertemplate.aspx //this page is copied and renamed to
for each user.

How can I do the above without creating new directories then copying
and renaming the template file? For example, if someone type in

www.abc.com/app/user1

The default index.aspx page in the app folder would take in the
parameter "user1", look it up in the database and then display the
webpage as above if the name is found.

Thanks,
john

Jan 22 '07 #1
5 1187
Assuming you are using ASP.Net 2.0, why don't you use a Master Page and
store the content page in the database. So if the user changes, simply fetch
the HTML for the appropriate user from the database.

HTH.

--
With Regards
Shailen Sukul
..Net Architect
(MCPD: Ent Apps, MCSD.Net MCSD MCAD)
Ashlen Consulting Services
http://www.ashlen.net.au
"JohnC" <jo***@bigstring.comwrote in message
news:11*********************@v45g2000cwv.googlegro ups.com...
>I have a webapp that allows users to delete/add content on a webpage.
The webpage is accessed like this:

www.abc.com/app/user1/
www.abc.com/app/user2/

where index.aspx is the default page. To do the above though requires
creating a new user subfolder, copying the index.aspx page from the app
folder and renaming it. This can be problematic when I need to update
templates.

www.abc.com/app/usertemplate.aspx //this page is copied and renamed to
for each user.

How can I do the above without creating new directories then copying
and renaming the template file? For example, if someone type in

www.abc.com/app/user1

The default index.aspx page in the app folder would take in the
parameter "user1", look it up in the database and then display the
webpage as above if the name is found.

Thanks,
john

Jan 22 '07 #2

Shailen Sukul wrote:
Assuming you are using ASP.Net 2.0, why don't you use a Master Page and
store the content page in the database. So if the user changes, simply fetch
the HTML for the appropriate user from the database.
Thanks. That will work but the URL will still look like this:

www.abc.com/app

How can I get it to look like this without creating subfolders:

www.abc.com/app/user1

Jan 22 '07 #3
hmm.. might have to look into custom HttpHandlers for that one.

Just a side suggestion... you could register a DNS domain and redirect
users to a url with a query string and hide it using cloaking, like so:

user1.abc.com --redirects to--abc.com?userid=user1
and use cloaking to hide abc.com?userid=user1

HTH

--
With Regards
Shailen Sukul
..Net Architect
(MCPD: Ent Apps, MCSD.Net MCSD MCAD)
Ashlen Consulting Services
http://www.ashlen.net.au
"JohnC" <jo***@bigstring.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
>
Shailen Sukul wrote:
>Assuming you are using ASP.Net 2.0, why don't you use a Master Page and
store the content page in the database. So if the user changes, simply
fetch
the HTML for the appropriate user from the database.

Thanks. That will work but the URL will still look like this:

www.abc.com/app

How can I get it to look like this without creating subfolders:

www.abc.com/app/user1

Jan 22 '07 #4
I know a subdomain can be setup manually but I need to do it
programmatically. I'm checking with my hosting service if that can be
done.

Howevever, I still need to display a webpage as a folder structure in
the URL. I'd like people to type in one of the addresses below,
instead of a webpage, and the particular page displays. What I'd like
is on the left and the actual page path is on the right:

user1.abc.com/ -user1.abc.com/index.aspx
user1.abc.com/site2 -user1.abc.com/site2.aspx
user1.abc.com/site3 -user1.abc.com/site3.aspx

Thanks,
john

Jan 22 '07 #5
This is called url rewriting. Search for Context.RewritePath...

"JohnC" <jo***@bigstring.coma écrit dans le message de news:
11**********************@38g2000cwa.googlegroups.c om...
>I know a subdomain can be setup manually but I need to do it
programmatically. I'm checking with my hosting service if that can be
done.

Howevever, I still need to display a webpage as a folder structure in
the URL. I'd like people to type in one of the addresses below,
instead of a webpage, and the particular page displays. What I'd like
is on the left and the actual page path is on the right:

user1.abc.com/ -user1.abc.com/index.aspx
user1.abc.com/site2 -user1.abc.com/site2.aspx
user1.abc.com/site3 -user1.abc.com/site3.aspx

Thanks,
john

Jan 22 '07 #6

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

Similar topics

5
by: Daniel | last post by:
Does anyone know how this can be done? Thanks
2
by: swbaz | last post by:
What is an effect way to prevent users from viewing a webpage directly by typing in its URL? For example: If a default page is set up as a login screen with user name and password. The user...
5
by: Jim Bayers | last post by:
I have a simple page, all that's on it is a datagrid. The datagrid is populated on page_load when it is bound to a datareader. The problem is: when a user refreshes the page, new records are...
1
by: Mamatha | last post by:
Hi I have an application which displays some data in listview in VB.NET,those data are displyed by threads and in those threads one thread go to connect to the net and getback with webpage...
4
by: Brooke | last post by:
Is there a way to prevent a user from printing a webpage?
0
by: rmli | last post by:
Duplicating a Database using RMAN http://quickdba.blogspot.com/2006/05/duplicating-database-using-rman_22.html
17
by: emma.sax | last post by:
Hi all, I have a form where we would like the user to input their email address twice, to ensure they've typed it correctly, as is found on most sign-ups I'm looking for a solution to the...
1
by: msxkim | last post by:
Hi all, I have a webpage with one iframe and a button. On Page Load event, if (!Page.IsPostBack) { string sDocUrl = //some doucmen url Iframe1.Attributes = sDocUrl; }
3
by: dk4300 | last post by:
Hi! Help! I have a 5 digit customer ID (long integer) field in frmClients (reads from tblClients). It is NOT a primary key because not all customers have one. I need to prevent a user from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.