Support » Developing with WordPress » Redirect permalink only with mod rewrite.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you ever get this figured out, Kurai? I’m trying to do the exact same thing that you are, except backwards – I’m moving from http://www.heiseheise.com/blog to http://www.heiseheise.com with my blog files and so I have a whole ton of old links just lying around to /blog that now redirect to nothing.

    I’d like to make it so that they’ll automatically drop the /blog from the URL and just go to the /?=%number% instead!

    please let me know if you were successful; we can probably reverse engineer it!

    heiseheise, you’d be better served doing a search/replace on your database, to change those links in your old posts.

    Have you figured it out, heiseheise?

    I have here an .htaccess rewrite that moves all requests for http://domain.com/blog to http://domain.com


    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^blog/?(.*) /$1 [R=301,L]
    </IfModule>

    example: a request for http://domain.com/blog/2008/06/hello-world/ will now be directed to http://domain.com/2008/06/hello-world/

    @kurai: The problem with your regex is that you’re only selecting a series of digits with [0-9]. You need to be selecting all the characters, basically, so the correct expression would be:

    RewriteRule ^kurai\.eu/(.+)/$ http://insertcoin.kurai.eu/$1/ [R=301,NC,L]

    wesg, that doesn’t work… Because for example with that code we can’t acceed to admin panel, or acceed to CSS styles, etc.

    I really need help on this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirect permalink only with mod rewrite.’ is closed to new replies.