I'm using joomla I'm trying to pass a variable in htaccess, ec I have to rewrite this address:

http:// site.com/en/one/userprofile/avatar3

to avatar3 can be every username

http:// site.com/en/two/userprofile/avatar3

I've tried doing like these but don't work

RewriteEngine on
RewriteRule ^/en/one/userprofile/(.*)$ http:// site.com/en/two/userprofile/$1 [R=301,NC,L]

没有正确的解决方案

其他提示

You can try:

RewriteEngine on
RewriteRule ^en/one/userprofile/(.*)$ /en/two/userprofile/$1 [R=301,NC,L]
  • .htaccess is per directory directive and Apache strips the current directory path (thus leading slash) from RewriteRule URI pattern.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top