Showing posts with label blog. Show all posts
Showing posts with label blog. Show all posts

Monday, March 26, 2012

Permalink Structure

I have been creating a personal blog engine for the last couple of ws
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.examnotes.net ***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.examnotes.net ***

Permalinks

Hello,

I am creating a simple Asp.Net Blog system. All blog posts have an ID which is an unique identifier (a GUID).

Now I wanna create permalinks. What format should I use? How can I do this?

Could someone, please, help me out?

Thanks,

Miguel

What's a permalink and what is it supposed to do?

Hi,

A permalink is a redefinition of the url in an easier way for a user to read or identify it.

Check http://en.wikipedia.org/wiki/Permalink

For example a blog post with such an url:

http://www.mydomain.com/post.aspx?id=398179823223

would become something like:

http://www.mydomain.com/<4 digit year>/<2 digit month>/<2 digit day>/<article name>/

This would show the post with id=398179823223

I don't know exactly how to implement this in my ASP.NET web site.

Thanks,

Miguel


Hi,

A permalink is a redefinition of the url in an easier way for a user to read or identify it.

Check http://en.wikipedia.org/wiki/Permalink

For example a blog post with such an url:

http://www.mydomain.com/post.aspx?id=398179823223

would become something like:

http://www.mydomain.com/<4 digit year>/<2 digit month>/<2 digit day>/<article name>/

This would show the post with id=398179823223

I don't know exactly how to implement this in my ASP.NET web site.

Thanks,

Miguel


Hi shapper,

Forgive me cuz i'm not familiar with this "permanent link" and what i suggested may be wrong. I searched thru the internet and found the following informaton. i hope it can be helpful to solve your problems anyway.

"With Ajaxium it is easy to construct permanent links which guide exactly to the page opened. So if the ASP.NET page is accessible for the visitor by a link, it is just as accessible when Ajaxium is enabled." (Orignial Article see:http://www.ajaxium.com/ajax-critique.aspx) So, could you try to impliment it using AJAX?

Hope my suggestion helps . thanks :)

Permalinks

Hello,
I am creating a simple Asp.Net Blog system. All blog posts have an ID
which is an unique identifier (a GUID).
Now I wanna create permalinks. What format should I use? How can I do
this?
Could someone, please, help me out?
Thanks,
MiguelTry :
http://en.wikipedia.org/wiki/Permalink and especially the "Popular permalink
formats" chapter.
This is likely most often done suign URL rewriting :
http://en.wikipedia.org/wiki/URL_rewriting
Patrice
"shapper" <mdmoura@.gmail.com> a crit dans le message de news:
1177340457.202371.125940@.l77g2000hsb.googlegroups.com...
> Hello,
> I am creating a simple Asp.Net Blog system. All blog posts have an ID
> which is an unique identifier (a GUID).
> Now I wanna create permalinks. What format should I use? How can I do
> this?
> Could someone, please, help me out?
> Thanks,
> Miguel
>
Hi,
Patrice wrote:
> Try :
> http://en.wikipedia.org/wiki/Permalink and especially the "Popular permali
nk
> formats" chapter.
> This is likely most often done suign URL rewriting :
> http://en.wikipedia.org/wiki/URL_rewriting
Why sue URL rewriting? What did it do to you? :-)
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Depending on the format used it can be a convenient way to map the permalink
to the actual page. For example the OP could parse all year/month/title.aspx
permalinks so that they all map to a default.aspx?id=someid request...
"Laurent Bugnion, MVP" <galasoft-lb@.bluewin.ch> a crit dans le message de
news: %23tbhMkjhHHA.4588@.TK2MSFTNGP02.phx.gbl...
> Hi,
> Patrice wrote:
> Why sue URL rewriting? What did it do to you? :-)
> Laurent
> --
> Laurent Bugnion [MVP ASP.NET]
> Software engineering, Blog: http://www.galasoft-LB.ch
> PhotoAlbum: http://www.galasoft-LB.ch/pictures
> Support children in Calcutta: http://www.calcutta-espoir.ch
Hi,
Patrice wrote:
> Depending on the format used it can be a convenient way to map the permali
nk
> to the actual page. For example the OP could parse all year/month/title.as
px
> permalinks so that they all map to a default.aspx?id=someid request...
Yes. I was trying to make a joke *S* Nevermind!
Greetings,
Laurent

> "Laurent Bugnion, MVP" <galasoft-lb@.bluewin.ch> a crit dans le message de
> news: %23tbhMkjhHHA.4588@.TK2MSFTNGP02.phx.gbl...
>
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch

Permalinks

Hello,

I am creating a simple Asp.Net Blog system. All blog posts have an ID
which is an unique identifier (a GUID).

Now I wanna create permalinks. What format should I use? How can I do
this?

Could someone, please, help me out?

Thanks,

MiguelTry :
http://en.wikipedia.org/wiki/Permalink and especially the "Popular permalink
formats" chapter.

This is likely most often done suign URL rewriting :
http://en.wikipedia.org/wiki/URL_rewriting
--
Patrice

"shapper" <mdmoura@.gmail.coma crit dans le message de news:
1177340457.202371.125940@.l77g2000hsb.googlegroups. com...

Quote:

Originally Posted by

Hello,
>
I am creating a simple Asp.Net Blog system. All blog posts have an ID
which is an unique identifier (a GUID).
>
Now I wanna create permalinks. What format should I use? How can I do
this?
>
Could someone, please, help me out?
>
Thanks,
>
Miguel
>


Hi,

Patrice wrote:

Quote:

Originally Posted by

Try :
http://en.wikipedia.org/wiki/Permalink and especially the "Popular permalink
formats" chapter.
>
This is likely most often done suign URL rewriting :
http://en.wikipedia.org/wiki/URL_rewriting


Why sue URL rewriting? What did it do to you? :-)

Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Depending on the format used it can be a convenient way to map the permalink
to the actual page. For example the OP could parse all year/month/title.aspx
permalinks so that they all map to a default.aspx?id=someid request...

"Laurent Bugnion, MVP" <galasoft-lb@.bluewin.cha crit dans le message de
news: %23tbhMkjhHHA.4588@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Hi,
>
Patrice wrote:

Quote:

Originally Posted by

>Try :
>http://en.wikipedia.org/wiki/Permalink and especially the "Popular
>permalink formats" chapter.
>>
>This is likely most often done suign URL rewriting :
>http://en.wikipedia.org/wiki/URL_rewriting


>
Why sue URL rewriting? What did it do to you? :-)
>
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch


Hi,

Patrice wrote:

Quote:

Originally Posted by

Depending on the format used it can be a convenient way to map the permalink
to the actual page. For example the OP could parse all year/month/title.aspx
permalinks so that they all map to a default.aspx?id=someid request...


Yes. I was trying to make a joke *S* Nevermind!

Greetings,
Laurent

Quote:

Originally Posted by

>
"Laurent Bugnion, MVP" <galasoft-lb@.bluewin.cha crit dans le message de
news: %23tbhMkjhHHA.4588@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

>Hi,
>>
>Patrice wrote:

Quote:

Originally Posted by

>>Try :
>>http://en.wikipedia.org/wiki/Permalink and especially the "Popular
>>permalink formats" chapter.
>>>
>>This is likely most often done suign URL rewriting :
>>http://en.wikipedia.org/wiki/URL_rewriting


>Why sue URL rewriting? What did it do to you? :-)
>>
>Laurent
>--
>Laurent Bugnion [MVP ASP.NET]
>Software engineering, Blog: http://www.galasoft-LB.ch
>PhotoAlbum: http://www.galasoft-LB.ch/pictures
>Support children in Calcutta: http://www.calcutta-espoir.ch


>
>


--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch

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 ***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 ***