Redirect to post with only post ID in the URL vs post_type/post ID

I used the following plugin lately:
https://github.com/kasparsd/numeric-shortlinks
to get post ID based shortlinks, like http://domain.com/123. That worked very well for me, with a couple of custom post types too.

On a sidenote, I’m not sure about your permalink structure, especially because %post_id% and %postname% are both uniquely referring to the same post, but on the other hand you might have a good reason for choosing the structure exactly like that.

In reference to Matthew’s comment i used the following in my register_post_type() call in above mentioned project:

        'rewrite'   => array(   'slug' => '/%post_type%',
                                'with_front' => false,
                                'pages' => true,
                                'feeds' => '',
                                'ep_mask' => 1 )

It’s just the rewrite part and of course you have to replace %post_type% accordingly – I also should mention that the settings for the permalinks would be set to just %postname%.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)