Forum Moderators: phranque
[eco.something.com...]
and I would rewrite it as
[eco.something.com...]
As you can see I need to to use the number between comma and dot of the first url as a parameter value for "nid" into rewritten url.
I have tried with a rule like this
RewriteRule ^/news/economy/([a-zA-Z0-9\-]+),$.html /leaf.html?nsid=$1 [QSA,L]
But maybe I have misanderstood the use of $ and, obviously, the rule doesn't work... :(
Have you any idea to accomplish the right result?
Thanx in advance!
axiom
Based on your example, Id suggest "^/news/economy/[a-zA-Z0-9\-]+,([^.]+)$\.html" to catch "one more characters not a period" following a comma and preceding a literal period (which must be escaped with a backslash as shown).
Also, if this code goes into .htaccess or into a <Directory> container inside httpd.conf or other server config file, then remove the leading slash from this pattern.
Please see the resources cited in our Forum Charter [webmasterworld.com] for more information.
Jim
thanx anyway,
rnwyz
It is not necessary to escape commas. If it were, I would have said so...
If this is the only rewriterule in the file, and you've just added it, then you'll need to set up and enable mod_rewrite by preceding your rule with:
Options +FollowSymLinks
RewriteEngine on
thanx everybody!
rnwyz