473,772 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=newsi te) 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 2155
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=news ite) 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.ht m" 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.or g/docs/misc/rewriteguide.ht ml>.

--
Jock
Jul 17 '05 #3

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

Similar topics

0
1133
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 turn refer to CSS and Javascripts. These Styles and JS files are located in th home folder. After making sure it is viewable offline, I upload it t the server. At this point, if I try to view the newly uploaded file, it gives a error along...
5
14063
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. This is my code:
2
3958
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 Canonicalpath-Directory4: \\wkdis3\ROOT\home\bwe\ You selected the file named AAA.XML getXmlAlgorithmDocument(): IOException Not logged in
1
3109
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 Transformer convert that via XSLT to valid XSL-FO. So I define a SAXReader which fires the SAX Events for the Java Object. This works fine and the Transformation to PDF is ok. However, I have one object which contains an XHTML String and the tags
1
5216
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 type="1"/> <event type="2"/> <method type="warning"/> <===end of file
7
1512
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 id. This is pretty much what happens with tinyurl.com (as far as I understand) but the examples I have read regarding this are using different technologies.
8
2705
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
4813
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 did have Apache2/ PHP5 working... I confirmed this via phpinfo output... But now that I removed my original directory containing Apache/PHP, and recompiled from scratch, I get everything to startup and static html is displayd, but phpinfo produces...
29
2150
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 files to .PHP so they would be parsed correctly. Oh contraire if you are hosted by Apache and have some access to the .htaccess file mechanism In my case through the "cPanel" and then "Apache Handlers"
1
3502
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 especially czech,polish,turkish in place of local language character some other word is comming. Eg: Input string :ahoj, jak se máš Output string :ahoj, jak se m&aacute;š
0
9454
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
10264
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
10106
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
10039
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
8937
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...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.