Welcome to WebmasterWorld Guest from 54.205.209.95

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Question about rewriting blog urls

   
2:18 pm on May 20, 2011 (gmt 0)

5+ Year Member



Greetings,
I am hoping to simplify a task that I have. We currently have a blog that we are moving to a different platform. The current blog has our URL set up like so:

blog.example.com/bid/#####/title-of-blog

Where ##### are numbers generated by the blog host. On our new platform we are implementing wordpress and have moved the content of the blogs over. The current URL is something like:

blog.example.com/title-of-blog

I can remove the /bid/ portion of the URL, and I can manually insert lines to remove the numbers, but is there a way to have one condition replace /#####/ where it is any (all 5 digit) number?

Thanks
3:29 pm on May 20, 2011 (gmt 0)



What did you use to remove the /bid/ portion, I am looking for the same solution.
3:53 pm on May 20, 2011 (gmt 0)

5+ Year Member



Should be something like so:

RewriteRule ^/bid/?(.*) /$1 [R=301,L]
4:00 pm on May 20, 2011 (gmt 0)



TY
4:10 pm on May 20, 2011 (gmt 0)

5+ Year Member



Ok, so I have been reading and trying to figure this out. I am sure this will be wrong, but here is my first shot.. :)

RewriteRule ^/bid/([0-9]+)/?(.*) /$1/ [R=301,L]
6:33 pm on May 20, 2011 (gmt 0)



RewriteRule ^/item/([0-9]+)-?(.*) /$1/ [R=301,L]

hoping to take domain.com/blog/item/####-title
TO
domain.com/blog/title
6:44 pm on May 20, 2011 (gmt 0)

5+ Year Member



yeah sounds like we are trying to do the same thing :)