A
A
Albert Kazan2018-03-20 11:13:53
htaccess
Albert Kazan, 2018-03-20 11:13:53

How to create the right rule?

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ index.php?p=$1 [L,QSA]
RewriteRule ^get/(.*)$ r.php?r =$1
There is a codec written a long time ago. The thing is, js scripts make requests for get/?. But in fact, due to the rule above, all requests go already here /index.php?p=get/?
. For example, such a request is made example.com/get/User/AddPost, but nothing happens, unfortunately. Tries to transfer toexample.com/index.php?p=get/User/AddPost

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Tallmange, 2018-03-20
@Farrien

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^get/(.*)$ r.php?r=$1 [L,QSA]
RewriteRule ^(.*)/$ index.php?p=$1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question