Forum Moderators: phranque

Message Too Old, No Replies

WP uncategorized rewrite htaccess

removing uncategorized from url

         

cholo husdons

1:21 am on Aug 16, 2009 (gmt 0)

10+ Year Member



Hello,

Is it possible through htaccess to remove only "uncategorized" from url posts?.. but leave other categories to display in url.

ie:

wwwsite.com/uncategorized/post/ into-> wwwsite/post.html

I have been looking for weeks for a solution, as I want to switch over a site to WP.. but do not want to create hundreds of 301 redirects.

please, and thankyou!

jdMorgan

1:59 am on Aug 16, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mod_rewrite is only part of the solution, and not actually the part that you're asking about.

If you want to "change a URL," you'll need to either edit the HTML pages, or modify the script that produces those pages. The URLs are *defined* by the links published on your pages. Once the URLs have been changed, then mod_rewrite can be used to "re-connect" requests for those modified URLs to the correct server filepaths.

As an optional third step, you can redirect direct client requests for the old URLs to the new, but this only serves to speed up search engines clearing out the older longer URLs *after* the new ones are published.

Jim