Domanda

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]

Nessuna soluzione corretta

Altri suggerimenti

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.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top