• 0

.htaccess help


Question

I need some help, I can't seem to figure this out.

This were my old URL's which are already indexed by Google etc.

http://example.com/2010/02/08/test-post-200/

So I've changed my URL structure to:

http://example.com/post/test-post-200/

How do I ignore the dates and redirect a user to the new URL? I've tried many things but none worked. In the end I just decided to post here.

Thanks in advanced!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I need some help, I can't seem to figure this out.

This were my old URL's which are already indexed by Google etc.

http://example.com/2.../test-post-200/

So I've changed my URL structure to:

http://example.com/post/test-post-200/

How do I ignore the dates and redirect a user to the new URL? I've tried many things but none worked. In the end I just decided to post here.

Thanks in advanced!

RewriteRule ^[0-9]{4}/[0-9]{2}/[0-9]{2}/(.*)/$ /post/$1

That's off the top of my head, my mod_rewrite is fairly rusty.

Link to comment
Share on other sites

  • 0

RewriteRule ^[0-9]{4}/[0-9]{2}/[0-9]{2}/(.*)/$ /post/$1

That's off the top of my head, my mod_rewrite is fairly rusty.

Dude! Thanks a bunch, it works well!

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.