2012-01-31 4 views
0

Любой может помочь мне, я хочу, чтобы переписать URL изпереписать URL с помощью Nginx

http://localhost/auditsi/cms3/index.phpdirMod=jobseeker&dirAct=myaccount&dirPref=view_front&dirMn=lWU=

в

http://localhost/auditsi/cms3/jobseeker/myaccount/view_front/lWU=

где /auditsi/cms/ является каталогом.

моей переписать здесь:

location/{ 
     } 

    location /auditsi/cms3/ { 
     index index.php index.html; 
     rewrite ^(.*)/(.*)/(.*)$ /index.php?dirMod=$1&dirAct=$2&dirPref=$3 break;    
    } 

Я узнать из вики Nginx, но никогда не succses :(

пожалуйста, помогите мне

+0

Разве вы не забыли знак вопроса в исходном URL-адресе, не так ли? –

+0

ops..sorry, я ошибаюсь. Хороший URL-адрес: http: // localhost /auditsi/cms3/index.php?dirMod=jobseeker&dirAct=myaccount&dirPref=view_front&dirMn=lWU=, но моя проблема такая же :( –

ответ

0

Пожалуйста, попробуйте следующее:.

server { 
    rewrite ^/auditsi/cms3/(.*)/(.*)/(.*)$ /index.php?dirMod=$1&dirAct=$2&dirPref=$3 break; 

    location { 

    } 

    location /auditsi/cms3/ { 
      index index.php index.html; 

    } 
.... 
+0

это работа, но только доступ http: // localhost/auditsi/cms3/jobseeker/myaccount/view_front, а не http: // локальный/auditsi/cms3/ищущий работу/MyAccount/view_front/СЛЖ = –

Смежные вопросы