apache url rewrite not working as expected

Posted by hetaoblog on Server Fault See other posts from Server Fault or by hetaoblog
Published on 2012-06-10T06:51:27Z Indexed on 2012/06/10 10:41 UTC
Read the original article Hit count: 284

looks as if it's working now, i'm not doing anything... stange...

I want to write http://www.1024jobs.net/jobs/view/17.jhtml to http://www.1024jobs.com/jobs/view/17.jhtml

so i have tried either of below rules in .htaccess

RewriteRule ^jobs/view/([0-9]+)\.jhtml$   http://www.1024jobs.com/jobs/view/$1.jhtml [L,R=301]

RewriteRule ^jobs/view/([^.]+).jhtml$   http://www.1024jobs.com/jobs/view/$1.jhtml [L,R=301]

but it's always translating to below url http://www.1024jobs.net/jobs/view/17.jhtml to http://www.1024jobs.com/jobs/view/.jhtml

however, just found below is translated correctly.... http://www.1024jobs.net/jobs/view/16.jhtml can anyone help and explain? thx

© Server Fault or respective owner

Related posts about apache2

Related posts about mod-rewrite