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

Permalink Structure

I have been creating a personal blog engine for the last couple of weeks
because I am tired of using WordPress and I don't have a SQL server
back-end. I have successfully created a working URL rewriting engine
(via Global.asax) that cleans illegal characters from the post title,
uses Regular Expressions to grab the entryID (ie 13), rewrite the path
(entry.aspx?entryID=13).

My current permalink structure is as follows:

root/blog/testing-post-example-00013.aspx

I have noticed that some blog engines have the following schemas for
their permalink structures:

root/blog/testing-post-example/00013.aspx

I have tried to create this structure programmatically with the
following code:

string EntryTitle = "testing-post-example";
string PermaLink = EntryTitle + "/" + "000" + EntryID + ".aspx";

When I try to run this I get the error that the file can't be found,
obviously. There must be a way to create this link structure without
having to physically create the directories. I can't imagine that all
of these bloggers login and create a directory for each post and place a
"showEntry.aspx" file in there.

Any suggestions?

- Will

*** Sent via Developersdex http://www.developersdex.com ***
Jan 20 '06 #1
1 1705
Nevermind!

Original RewritePath
httpContext.RewritePath("entry.aspx?entryID=" + pageID);

New RewritePath
httpContext.RewritePath("/entry.aspx?entryID=" & pageID)

No wonder it was FILE NOT FOUND (enry.aspx). Instead of looking in the
root directory (actual location) for entry.aspx it was looking for
entry.aspx in the dynamically created "directory" folder.

*** Sent via Developersdex http://www.developersdex.com ***
Jan 20 '06 #2

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

Similar topics

2
by: vikas | last post by:
I have following structure in c++. typedef struct MMF_result_struct { int action; char text; int cols,rows; int month,day,year; } MMF_result; Now this structure is shared between C++ and C#...
26
by: Brett | last post by:
I have created a structure with five fields. I then create an array of this type of structure and place the structure into an array element. Say index one. I want to assign a value to field3 of...
4
by: marco_segurini | last post by:
Hi, From my VB program I call a C++ function that gets a structure pointer like parameter. The structure has a field that contains the structure length and other fields. My problem is that...
8
by: Charles Law | last post by:
Can anyone suggest how I would marshal a variable length structure back from an API call. Specifically, I am looking at the WaitForDebugEvent function, which returns a DEBUG_EVENT structure. ...
15
by: Charles Law | last post by:
I have adapted the following code from the MSDN help for PropertyInfo SetValue. In the original code, the structure MyStructure is defined as a class MyProperty, and it works as expected. There is...
3
by: Kiran B. | last post by:
Hi, I am new to .net. I have two Data Structure Type ... Sturcture A and Structure B. Structure A Public Fname as String Public LastName as String Public City as String Public Zip as String...
10
by: David Fort | last post by:
Hi, I'm upgrading a VB6 app to VB.net and I'm having a problem with a call to a function provided in a DLL. The function takes the address of a structure which it will fill in with values. I...
1
by: Tim Haughton | last post by:
For the .Net framework 3.0, the download link is... http://go.microsoft.com/fwlink/?LinkId=70848 If I'm creating an installer, how do I find the permalink for redistributables? For example, I...
5
by: =?Utf-8?B?QXlrdXQgRXJnaW4=?= | last post by:
Hi Willy, Thank you very much for your work. C++ code doesnot make any serialization. So at runtime C# code gives an serialization error at "msg_file_s sa = (msg_file_s) bf.Deserialize(ms);"...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
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
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...
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.