473,405 Members | 2,373 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.

URL Parsing on Apache or IIS

I am coming up with a new site, which will be community-driven and
subscription-based. I would like for people to go ato a URL that is
friendly and easy to remember.
Let's say my domain is mydom.com. I am a new user who just registered
newsite as my name. I want to load a PHP file, but call it something
other than - say - default.php. In other words, I want to load a
pagedefault.php file which will pull information from a database based
on the user's name. There are not going to be user directories. (The
user will have no ability to upload using FTP.)

As I currently see it, I can do something like:
http://www.mydom.com/default.php?username=newsite

What I'd like to do is something like:
http://www.mydom.com/newsite/default.htm on the address bar of the
browser. This will be parsed into the correct parameter
(username=newsite) and the correct page (default.php) will be loaded.
I noticed one semi-related item here from a bit ago..

www.webmasterworld.com/forum88/421.htm

This forum post describes the use of MOD_REWRITE.

Ideas?
Kai
www.perfectreign.com - The Project Management Site
Jul 17 '05 #1
2 2133
On Wed, 02 Jun 2004 13:09:24 -0700, filesiteguy <ab***@127.0.0.1> wrote:
As I currently see it, I can do something like:
http://www.mydom.com/default.php?username=newsite

What I'd like to do is something like:
http://www.mydom.com/newsite/default.htm on the address bar of the
browser. This will be parsed into the correct parameter
(username=newsite) and the correct page (default.php) will be loaded.
I noticed one semi-related item here from a bit ago..

www.webmasterworld.com/forum88/421.htm
Can't see it, need to register.
This forum post describes the use of MOD_REWRITE.


I agree, use mod_rewrite.

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #2
filesiteguy wrote:
I am coming up with a new site, which will be community-driven and
subscription-based. I would like for people to go ato a URL that is
friendly and easy to remember.
Commendable, old boy.

Persistency is another consideration. But I bet you've already
thought of that and filed it under "friendly". Non-persistent URIs
are surely unfriendly.

[ ... ]
As I currently see it, I can do something like:
http://www.mydom.com/default.php?username=newsite

What I'd like to do is something like:
http://www.mydom.com/newsite/default.htm on the address bar of the
browser.
Good, that's definitely better; yet it could be improved upon. Why is
"default.htm" tacked on the end? I don't like it. Firstly, "default"
isn't very descriptive. What information can a user gain from that
part of the URI? Secondly, going back to the persistency principle,
will your file still be HTML ten years down the line? Get rid of
".htm" too. Make it work with or without the www subdomain and the
trailing slash, but be cache-friendly by being consistent with what
you publish.

What constraints are placed on site names? E.g., length, case,
characters allowed, etc.

[ ... ]
This forum post describes the use of MOD_REWRITE.


See also <http://httpd.apache.org/docs/misc/rewriteguide.html>.

--
Jock
Jul 17 '05 #3

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

Similar topics

0
by: Tripredacus-X | last post by:
I am experiencings a temporary parsing issue on a server running Apache I am not sure of the version at this time. Here is what happens: I code the XML files and have it refer to an XSL, which in...
5
by: Aleksandar Matijaca | last post by:
Hi there, I am in some need of help. I am trying to parse using the apache sax parser a file that has vaid UTF-8 characters - I keep end up getting a sun.io.MalformedInputException error. ...
2
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home...
1
by: Jens Mueller | last post by:
Hi there, this is a Java-XML Question, so I am not sure whether this is the right place, haven't found anything better .... I try to convert a Java object to XML via SAX and let the FOP...
1
by: An Ony | last post by:
Hi, I'm looking at the examples on http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/2a_echo.html I want to parse an XML file that has just events, like this: ==>start of file <event...
7
by: dylan | last post by:
Can anyone tell me if it's possible to enter a URL such as http://www.streetfish.co.uk/1234 and take the number and pass it to the index.php script (where the number is the user's mySQL user...
8
by: pradeepsarathy | last post by:
Hi all, Does the SAX parser has eventhandlers for parsing xml schema. Can we parse the xml schema the same way as we parse the xml document using SAX Parser. Thanks in advance. -pradeep
1
by: Randell D. | last post by:
Folks, I consider myself well versed with Apache 1.3 and PHP4 - I found drupal and wanted to try it out - I had problems getting it working with Apache2/PHP5/MySQL5 so I downgraded... Note: I...
29
by: lenbell | last post by:
It's old stupid and lazy here again I have been wanting to keep using my WYSIWYG (What You See Is What You Get - for my fellow stupids) html editor. But I was told that you HAD to rename your...
1
by: Sidhartha | last post by:
Hi, I am facing a problem while parsing local language characters using sax parser. We use DOM to parse and SAX to read the source. But when our application parses strings with local language...
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: 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
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:
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
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...

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.