N
N
newaitix2016-04-17 21:01:51
Apache HTTP Server
newaitix, 2016-04-17 21:01:51

How to make such a CNC?

I have a
RewriteRule ^industries/([^/]*)([/?]*)(/?)+$ industries/index.php?razd=$1&page=$2 [L]
Help me finish.

/industries/index.php
/industries/index.php?page=1
/industries/bankivska_ta_finansova_diyalnist/index.php
/industries/bankivska_ta_finansova_diyalnist/index.php?page=1

razd should contain bankivska_ta_finansova_diyalnist
In the industries folder there is one index.php file and all these urls should be addressed to it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2016-04-18
@shambler81

RewriteRule ^industries/([^/]*)([/?]*)(/?)+$ http://site.ru/industries/index.php\?razd=$1&page=$2 [L]

It is possible to make through the base dir
In general, there are much more valid ways.
From myself, I’ll add that
1. the get request is not included in the url, this is not part of the url, so you need to snatch them out through the query string in the rewrite cond.
Second, if you direct to the url, then escape it? Otherwise, it won't work, or pass the Queri string right away.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question