Welcome! Log In Create A New Profile

Advanced

how to make rewrite rule...

Posted by isumido 
how to make rewrite rule...
September 26, 2011 11:12AM
hi Guys..

im so sorry. my english is too poor.

i wanna make Fancy URL.

files path :
/public_html/_A/AA/a.html
/public_html/_A/BB/b.html
/public_html/_B/AA/a.html
/public_html/_B/BB/b.html
/public_html/_C/AA/a.html
/public_html/_C/a.html



i wanna try to make rewrite rule like this...

1.http://domain.com/A^AA|a.html
call /public_html/_A/AA/a.html

2.http://domain.com/B^AA|a.html
call /public_html/_B/AA/a.html

3.http://domain.com/a.html
call /public_html/_C/a.html

4.http://domain.com/AA|a.html
call /public_html/_C/AA/a.html

5.http://domain.com/_A/AA/a.html
call 404 error

6.http://domain.com/C/a.html
call 404 error

help me please.
how can i make it?


PS.
http://domain.com/abc

redirect to
http://domain.com/?abc


try_files $uri $uri/ /?$uri&$args; is right?



Edited 1 time(s). Last edit at 09/26/2011 11:18AM by isumido.
Re: how to make rewrite rule...
September 26, 2011 11:59AM
PS.
http://domain.com/abc

redirect to
http://domain.com/?abc


try_files $uri $uri/ /?$uri; is right?

by the way,

if extension is exist,

http://domain.com/abc.js
redirect to http://domain.com/javascript/abc.js

http://domain.com/query|abc.js
redirect to http://domain.com/javascript/query/abc.js

http://domain.com/query|abc.jpg
redirect to http://domain.com/javascript/query/abc.jpg


how can i do it?



Edited 3 time(s). Last edit at 09/26/2011 12:03PM by isumido.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 145
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready