문제

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