Welcome Guest, Not a member yet? Register   Sign In
Friendly urls... What's your preference?
#11

[eluser]jedd[/eluser]
[quote author="M Moeen uddin" date="1249104742"]jedd,

if there is a case in which you want to secure your content against crawlers, all you can do make it a bit difficult .. or you said obfuscate it. a site which has no such information and does not feel to that the information avaialable in any sense become abuse to server or something... what you do then?

i think its about security. Before someone hacks, we can atleast read the precautionary measures. thats my choice.[/quote]

I can't understand what position you're advocating here, sorry.

Are you suggesting that security by obscurity is a valid approach?

You can't just 'make it a bit difficult' for crawlers - you can block them. If they're sociable, you can do this with robots.txt. If they're not, then it's likely that you don't care about the dozen or so people that use unsociable search engines. And in any case you can block those just by putting in a basic authentication system.

To reiterate - confusing, ephemeral, duplicated URL's != basic authentication system.
#12

[eluser]tomdelonge[/eluser]
[quote author="jedd" date="1249109222"]
This might not worry you -- it definitely doesn't worry me -- but apparently this causes web crawlers to doubt the quality of your site.
[/quote]
I don't know that a web crawler would know the difference (I'm assuming no one changes a link and puts it somewhere.) In the end, the not real link would probably never exist, it's just "possible" for it to.

The point was for seo (which I know next to nothing about). I just know that the context of the link helps those specific keywords, rather than having meaningless numbers only.

Also, it seems useless to check both the id and the title against the database.
#13

[eluser]John_Betong[/eluser]
[quote author="tomdelonge" date="1249118416"]
I don't know that a web crawler would know the difference (I'm assuming no one changes a link and puts it somewhere.) In the end, the not real link would probably never exist, it's just "possible" for it to.

The point was for seo (which I know next to nothing about). I just know that the context of the link helps those specific keywords, rather than having meaningless numbers only.

Also, it seems useless to check both the id and the title against the database.[/quote]
 
 
My crawl errors
 

>>> Also, it seems useless to check both the id and the title against the database.
I should imagine that the id would be unique but there is a possibility to have duplicate title.
 
 
 
#14

[eluser]Unknown[/eluser]
My choice is using simple method: url_title('subject') as ID, my mission is to cover [dot] php extension and change into other extensions..

.html
.asp
.jsp
.java
.cgi
.etc

I'm using extension [dot] Java...hahaha....

Code:
function insert_post()
    {
    $this->load->helper('url');
    $this->load->database();
    $data=array('id' => $this->input->post('id'),
                'post_date' => $this->input->post('post_date'),
                'category' => $this->input->post('category'),
                'subject' => $this->input->post('subject'),
                'body' => $this->input->post('body'),
                'author' => $this->input->post('author'));
    $subject=$this->input->post('subject');
    $data['seo_url'] = url_title("'$subject'".".java");        
    $this->db->insert('posting', $data);
    redirect('blog/main');
#15

[eluser]Jonas G[/eluser]
I always make a 'slug' field in the database and create the unique slug with url_title(). That way the urls don't have to include the id. I don't know if there are any performance issues with this (slower to look up a text field from the db).
#16

[eluser]wabu[/eluser]
My own preference is none of those listed. Wink

I'd prefer to navigate to the site's topics. Then I'd like to browse to a particular topic under those topics. Finally I might want to act on that specific topic, such as view (show), edit or delete (if permitted), etc. The result is:

example.com/topics/243 (view is implicit, for other actions I'd see "/new," "/edit," etc.)

"Topics" may be a separate application, which is why "view/topics" isn't my ideal (is "view" a directory of apps?). IMO separate apps are configured just below the root.

My advice is to use what works best for you while being aware of other options.
#17

[eluser]Chicken's Egg[/eluser]
My choice is number 3, for the reasons already mentionned in this threat. So, my urls look like:
3) example.com/view/topic/243/this-is-a-title/

I do show the ID, but it gives me at least the freedom to use non unique titles if I feel the need to. Are unique titles a problem? May be they are, may be they aren't at all. My guess is that the answer depends on the module you are building. For forums, weblogs, daily news I would use the ID. For the module 'about me' with just a few pages about me and my website, it might be worth considering an url like: example.com/about/read/us.htm. Or even better, like Wabo does: example.com/about/us.htm

About SEO.
It has been put forward in this threat that solution number 3 might have a disadvantage as example.com/blog/2/correct_title.htm would show the same page as example.com/blog/2/non_correct_title.htm. This is true. However, there is quite simple solution. Rebuilt the filename, check it with the current filename and if they are not the same, just redirect the page to the correct one.




Theme © iAndrew 2016 - Forum software by © MyBB