WordPress.org

Ready to get started?Download WordPress

Forums

Switching from domain.com/2012/10/23/post-title to domain.com/post-title (9 posts)

  1. json21
    Member
    Posted 1 year ago #

    I've had a network of 50 blogs for about three months, and I've been using:

    http://domain.com/2012/10/23/sample-post/

    in Settings -> Permalinks

    I would like to improve websites performance in search engines and change it too http://domain.com/post-name . I have it set up this way in some other WP blogs.

    All the websites are already indexed in Goolge and other search engines and when I change the settings to post name only and click on http://domain.com/2012/10/23/post-name in SERPS it gets me to an error page.

    Can you tell me what is the best way to go about this one. I heard that I can use a rewrite rule that is gonna redirect the URLs to the right place. I definitely want to change it and strip the date from the URLs. I will be probably stripping "/category/" from URL slugs with Yoast SEO plugin also.

    I want to change the URLs, make some other changes in the blogs, and submit sitemaps to Google and probably getting it reindexed again etc.

    Please let me know what is the best way to go about this one.

    Thank you.

  2. Not a Multisite Question really, but just go ahead and change it.

    WordPress should redirect on it's own.

  3. json21
    Member
    Posted 1 year ago #

    It recognizes domain.com/post-name when I enter it in a browser (when it is set to domain.com/2012/10/24/post-name), but it doesnt work the other way around.

    When I click on domain.name/2012/10/24 in Google results I get an 404 error from WP.

  4. rait56
    Member
    Posted 1 year ago #

    Yah i also face this problem...but why?

  5. Bleah. Stupid rules. Okay, you can use .htaccess :)

    RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ http://domain.com/$4 [L,R=301]

    Put that before the WordPress section :)

  6. json21
    Member
    Posted 1 year ago #

    Thank you. It is a network of 50 sites, and the main site (in Network Admin -> Dashboard -> All Sites) is set to http://www.domain-name.com (all the other ones are subdomain.domain-name.com).

    Does this mean that I would need to replace:

    http://domain.com/$4

    with:

    http://www.domain-name.com

    Another thing is that I want to strip "/category" clug too, and it is currently apearing in search results in Google etc.

  7. I don't advocate removing the category tags, personally, but there are plugins for that.

    If you only want to redirect that one domain, do this:

    RewriteCond %{HTTP_HOST} ^domain\.com
    RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ http://domain.com/$4 [L,R=301]

    That will check "if I'm going to domain.com/2012/10/25/foobar/, send me to domain.com/foobar/"

  8. json21
    Member
    Posted 1 year ago #

    I would need it for all sites, for "category/" and date ("2012/10/26"). Is this possible?

  9. Category is a bigger issue, you'll need a plugin (try WordPress SEO).

    What do you mean 'And date...' thought? Concrete examples? You mean /category/2012/10/26/postname?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.