943,584 Members | Top Members by Rank

Sep 3rd, 2008
0

specific mod_rewrite case

Expand Post »
I migrated blogs from serendipity to wordpress. In doing so, I went from one url schema to another.


Serendipity:
http://example.com/index.php?/archives/111-Example-title!-of-POst.html


Wordpress:
http://example.com/example-title-of-post/


Notice that it needs to have caps removed and all punctuation except the '-' removed from the URL. Now the nearest I can come up to with this is the following:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index.php\?/archives/([0-9]+)-(.*)\.html$ http://linux-blog.org/$2/ [R=301,QSA,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress


The most important line being: RewriteRule ^index.php\?/archives/([0-9]+)-(.*)\.html$ http://linux-blog.org/$2/ [R=301,QSA,L]


OF course, this doesn't work at all. Can someone point me in the right direction?
Similar Threads
TKS
Reputation Points: 108
Solved Threads: 18
Posting Pro in Training
TKS is offline Offline
470 posts
since Jan 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Servers and Apache Forum Timeline: Parlez-vous le Linux?
Next Thread in Linux Servers and Apache Forum Timeline: The Linux Party





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC