specific mod_rewrite case

Reply

Join Date: Jan 2004
Posts: 468
Reputation: TKS will become famous soon enough TKS will become famous soon enough 
Solved Threads: 18
TKS's Avatar
TKS TKS is offline Offline
Posting Pro in Training

specific mod_rewrite case

 
0
  #1
Sep 3rd, 2008
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?
My Home Away from Home: Yet Another Linux Blog
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Linux Servers and Apache Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC