basketmen — 2010-09-17T11:53:25-04:00 — #1
I want to redirect Rewrite dynamics oldname-id.html to newname-id.html , because the file name is changed
The file name is changed
the id is dynamic numbers
and so on
to new urls
and so on
Please help guys what is the right htaccess for this
scallioxtx — 2010-09-17T14:51:03-04:00 — #2
Normally I don't deal out freebies, but this one is quite easy.
Here ya go:
RewriteRule ^country-origin-Irish-page-(\\d+)\\.html$ /country-origin-Irlandia,_Ireland,_Irish-page-$1.html
If you are on Apache 1.x change ^ to ^/
If you're not sure whether you are Apache 1.x or 2.x change ^ to ^/?
scallioxtx — 2010-09-18T04:00:23-04:00 — #3
Yes I know, but the "and so on" he typed suggested to me there are lots of URL's, in which case I reckoned mod_rewrite would be faster
dklynn — 2010-09-18T00:58:25-04:00 — #4
I already gave him that - in the tutorial linked in my signature AND which is in the sticky posts. Why, oh, why do we have to repeat EVERYTHING when someone won't take the time to look. I hate spoonfeeding!
In addition, if basketmen only has the four URLs to change, mod_alias' Redirect would be much faster (but only because it's part of Apache's core).