F
F
freshik3122018-10-07 06:20:33
htaccess
freshik312, 2018-10-07 06:20:33

What is wrong with my htacces syntax?

Hello urgent question...
my htaccess

RewriteRule ^papka/(.*\.html)$ /index.php?url=$1
RewriteRule ^papka/read/(.*)/(.*)\.html$ /index.php?read=$1&img=$2

when going to papka/read/123.html the site continues to read as papka/123.html

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2018-10-07
@dodo512

^papka/(.*\.html)$
.*means any number of any characters, i.e. may match with read/123.
We need a pattern [^/]+that means any characters except /.
Or just swap the rules so that the template is ^papka/read/(.*)/(.*)\.html$checked first.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question