473,405 Members | 2,379 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,405 software developers and data experts.

how can genrate different URLs but showing same html page

Hi, I am developing forum website as my final year project. I am having problem in generating different URLs but keeping the same page..

Scenario: I am showing threads for different languages in different page, but since format of data is same for threads of all the languages, so what i planned was, to write one single xhtml page, which will be populated by data at run time using php/mysql. but i want to show different URLs for different languages thread, even when same html page is called.



i am taking the reference of bytes.com only for this design. please let me know if my understanding is wrong about design.

i would be really grateful for any help in this.

thanks in advance.
Mar 15 '09 #1
5 2746
Markus
6,050 Expert 4TB
So you want multiple URLs to point to the same page? How would the URLs be set up?

I still don't fully understand 'showing different languages in different page'. Can you explain?
Mar 15 '09 #2
yes exactly, i want to generate different URL for same page, containing different data at different instances.

sorry if i confused you earlier.
Mar 15 '09 #3
TheServant
1,168 Expert 1GB
Well one way is to have multiple pages, which all include one file... So you have your main page (main.php):
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>...</head>
  3. <body>...</body>
  4. </html>
Then all your other pages (eg. page1.php and page2.php):
[code]<?php include( 'main.php' ); ?>[code]

That means if someone goes to main.php, page1.php or page2.php they will all have the same content and can all be changed from one file (main.php).
Mar 15 '09 #4
you are suggesting to have different pages with same content. but what i am looking for is 1 page with different content at different instances & have different URL at those instances.
meanwhile i have came across a concept in PHP called search engine friendly URL, which probably solves this problem. But i am not sure about it.

It would be really great if some one can share me a small sample code for this.
Mar 16 '09 #5
TheServant
1,168 Expert 1GB
The problem with your suggestion is your html referring to your dynamic page name will also need to be dynamic. Changing the page name once it has been generated is the mod rewrite commands, however I have never had a dynamic mod rewrite.
If your one page is changing content then you will basically have 3 pages contents in one and change the page name depending on content selected. I cannot understand why you don't have 3 pages (no page re-naming) with the three different contents (no conditions) and if you want pages only to be accessable at certain times you can have a small script to forward to the appropriate page if the condition is met, rather than displaying the requested page.
Mar 16 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fuzzyman | last post by:
I am trying to parse an HTML page an only modify URLs within tags - e.g. inside IMG, A, SCRIPT, FRAME tags etc... I have built one that works fine using the HTMLParser.HTMLParser and it works...
21
by: AES/newspost | last post by:
My understanding -- I'm not an expert -- is that on (some? many? all?) standard Internet servers a URL can point to a subdirectory name followed by a backslash, and that links to this URL will...
1
by: Job Lot | last post by:
how to genrate random colors without repeat of the same color or color code. I am creating a line graph using ComponentOne Chart control and what to show series with different colors. thanx
4
by: | last post by:
I have earlier used an HttpModule that did URL rewrites on the BeginRequest event. Now I am trying to use the same module in a different application on a new and upgraded machine (winxp sp2). ...
0
by: Flip | last post by:
I am retrieving a web page and then taking an inside table to display as an RSS feed. However, there are some relative URLs in there. Of course they work perfectly fine when using IE and...
6
by: Jason | last post by:
I have a sticky problem relating to my 'join' registration form inside our authenticatin system... We have just signed up for salesforce.com and I need to somehow integrate the canned...
4
by: dk9 | last post by:
The Situation: I'm working in my browser at a secured site (https). At the same time I need my application to get and parse some urls from that same site. What I've tried: I've login with my...
13
by: mark4asp | last post by:
When I write a url in xhtml, with an unencoded ampersand, like this: http://localhost:2063/Client/ViewReport.aspx?Ref=58&Type=SUMMARY the xhtml sytax checker correctly indicates an error,...
1
by: Chris | last post by:
Ok, I am new to php and kinda self teaching myself but I haven't found anyone with this problem. I am creating a site to manage my movies basicly the site will add movies to a database and view, as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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...
0
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...

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.