remove category from url path

I have a wordpress site and on my post, the url is the following:

http://www.domain.com/category/blog

How would I remove category from that url so that the path is just http://www.domain.com/blog

If not in wordpress, can something be done in Apache?

Also, in wordpress dashboard my permalink is set to /%postname%
COwebmasterAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ittogoCommented:
You could set up a redirect so that http://www.domain.com/blog redirects to www.domain.com/category/blog.  (http://www.yolinux.com/TUTORIALS/ApacheRedirect.html)

or you could reinstall wordpress in the root of your hosting directory.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
florjanCommented:
You could also move your blog. Instructions are found here: http://codex.wordpress.org/Moving_WordPress
0
mjjdesignsCommented:
When viewing the "Category" view of a particular WordPress category, there's no way built into to remove the word "Category" from the URL.

What you can do instead (and I've done many times) is to create a PAGE using a template that outputs all of the posts from a given category, and then setup a redirect from /category/blog to just /blog

It's a bit more work to do, but if you really don't want the word "category" in the URL, that's the best (and actually, the easiest) way to do it.

If you need the actual code to do what I'm describing, let me know.
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

COwebmasterAuthor Commented:
mjjdesigns, yes if you have that code, that would be great.
0
mjjdesignsCommented:
Bear with me, I'm new at this thing so I may botch the formatting here.

First, in your .htaccess file in the top level directory of your WordPress installation, add this:
 
RedirectMatch 301 ^/category/blog/$ http://www.youriste.com/blog/

Open in new window


Then create a "Blog" Page template, for example:
 
<?php
/*
Template Name: Blog Template
*/
?>
<?php get_header();?>

//Whatever styling you have for your page layout here
    <?php
$wp_query = new WP_Query();
$wp_query->query('cat=INSERTYOURBLOGCATEGORYIDHERE&paged='.$paged.'');
 ?>
    <?php if ($wp_query->have_posts()) : ?>
    <?php 

$i=1;
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
   
        <?php the_content();?>
     
    <?php		 
				 $i++;
				 endwhile;?>
    <?php endif;?>
   //REST OF YOUR PAGE STYLING HERE AFTER CONTENT
  <?php get_sidebar();?>

<?php get_footer();?>

Open in new window


You need to enter the category ID for the "blog" category, as well as add whatever styling you need for the page to look right, as well as for each post's display.

Then just create a new "Page" in WordPress, called "Blog", set the page template as "Blog Page Template" and you should be all set.

If you run into any issues, let me know.
0
gwkgCommented:
0
COwebmasterAuthor Commented:
Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.