mod rewrite - .htaccess RewriteCond REQUEST_URI Dynamic SEO Generated URIs -
ok eyes , fingers bleeding trying stuff work. here couple examples of incoming uris want test in .htaccess file.
abc.com abc.com/en abc.com/zh-cn/ abc.com/fr/page1 abc.com/fr/page2/page3 abc.com/fr/page2/page3/ abc.com/fr/page2/page3.html
the first dir needs utf-8 language code between 2 , 5 characters long, or without / @ end. use test this:
rewritecond %{request_uri} ^/(([a-z]{2})(-[a-z]{2})?)
the second dir , on can lumped , cleaned later on in code. here full rewritecond:
rewritecond %{request_uri} ^/(([a-z]{2})(-[a-z]{2})?)([a-z0-9-\./]*)$ [nc]
i'm getting 403 error this. 1 know i'm doing wrong here?
thanks ton,
vince
here solution actaully ended using.
uri examples may need pars:
abc.com/en abc.com/zh-cn/ abc.com/fr/page1 abc.com/ru/dir1/page2 abc.com/jp/dir1/page2/ abc.com/es-mx/dir1/dir2/page3.html
the rewriterule ended using:
rewriterule ^(([a-z]{2})(-[a-z]{2})?)(/([a-z0-9-\./]*))?$ /index.php?arg1=$1&arg2=$4 [qsa,l,nc]
Comments
Post a Comment