Get empty GET .htaccess?

Hello!

Can't understand why you get empty GET? Everything seems to make correctly!
On index.php all the parameters get, but when switching to channel.php here on this link
localhost:8888/channel/146
the page opens, all the rules, but get empty GET?
Of course if you open localhost:8888/channel.php?id=146
all the rules, GET get.
Please help

Here is my .htaccess

# ustanavlivat encoding
AddDefaultCharset utf-8

# specifies the boot order types index file
# the root directory
DirectoryIndex index.php index.html index.htm index.shtml

#
#php_value session.gc_maxlifetime 3600

# if the directory is a reference
Options +FollowSymLinks

# include mod_rewrite conversion process references
RewriteEngine On
RewriteBase /

# redirect from www.site.ru on site.ru
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

# remove the last slash
RewriteRule ^(.*)/$ /$1 [L,R=301]

# if there is no such folder/directory
RewriteCond %{REQUEST_FILENAME} !-d 
# if no such file
RewriteCond %{REQUEST_FILENAME}\.php -f

RewriteRule ^(.*)$ $1.PHP [QSA,L]

# Convert

# CHANNEL.PHP
# /channel/146 -> /channel.php?id=146
RewriteRule ^channel/([0-9]+)$ /channel.php?id=$1 [QSA,L,NC]

# INDEX.PHP
# /movies-and-series/2019-12-10 -> /index.php?genre=movies-and-series&date=2019-12-10
RewriteRule ^([a-zA-Z0-9-]+)/([0-9-]+)$ /index.php?genre=$1&date=$2 [L,NC]

# /2019-12-10 -> /index.php?date=2019-12-10
RewriteRule ^([0-9-]+)$ /index.php?date=$1 [L,NC]

# /sport -> /index.php?genre=sport
RewriteRule ^([a-zA-Z0-9-]+)$ /index.php?genre=$1 [L,NC]


Thank you!
April 3rd 20 at 17:23
1 answer
April 3rd 20 at 17:25
RewriteRule ^channel/([0-9+])$
[0-9+] sweep for a brace
Thank you, corrected.
Error because you copied a hundred times already, still empty ( - lolita_Harr commented on April 3rd 20 at 17:28
@lolita_Harr, All the rest RewriteRule work right? - Mallory_Spin commented on April 3rd 20 at 17:31
@Mallory_Spin, Yes! for index.php the rules work all the rules - lolita_Harr commented on April 3rd 20 at 17:34
@Mallory_Spin, that I can not understand why so? should all work but no - lolita_Harr commented on April 3rd 20 at 17:37
@Mallory_Spin, a feeling that by this rule passes
link type localhost:8888/channel/146/333/23423
norms offer although I think should not! what do you think? - lolita_Harr commented on April 3rd 20 at 17:40
@lolita_Harr, https://htaccess.madewithlove.be?share=a91f3530-be... should not. And $_GET for the rules index.php is displayed right? - Mallory_Spin commented on April 3rd 20 at 17:43
@Mallory_Spin, Yes that's right - lolita_Harr commented on April 3rd 20 at 17:46
@Mallory_Spin, I pozhogin there is the fact that red stood out, and all the rules went out but the LAN still empty GET
https://htaccess.madewithlove.be?share=94c812f8-f6... - lolita_Harr commented on April 3rd 20 at 17:49
@Mallory_Spin, XS the magic of some kind - lolita_Harr commented on April 3rd 20 at 17:52
@lolita_Harr, what red stood out comment is not necessary. Red stood out such as the rule about the www redirect and it just was not caught in the moment - Mallory_Spin commented on April 3rd 20 at 17:55
@Mallory_Spin, tester all rules are checked all the work, but the LAN /channel/146 empty GET - lolita_Harr commented on April 3rd 20 at 17:58
@lolita_Harr, there is no magic but works like MultiViews
To disable it, you can:
Options +FollowSymLinks add here-MultiViews
Options +FollowSymLinks -MultiViews

And clean rules:
# if there is no such folder/directory
RewriteCond %{REQUEST_FILENAME} !-d 
# if no such file
RewriteCond %{REQUEST_FILENAME}\.php -f

RewriteRule ^(.*)$ $1.PHP [QSA,L]
- Charlotte_Kihn commented on April 3rd 20 at 18:01
@Charlotte_Kihn, ufff damn super thanks
cut down MultiViews and all zarabotalo
what MultiViews does not prompt? - lolita_Harr commented on April 3rd 20 at 18:04
@Charlotte_Kihn, googled
thanks again - lolita_Harr commented on April 3rd 20 at 18:07
@Charlotte_Kihn, another question, why do You say that these lines should be deleted
just read a lot about the rules and examples we've looked everywhere they are present?
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f
- lolita_Harr commented on April 3rd 20 at 18:10
@lolita_Harr, this can lead to looping and falling with the 500 error, and in logs something like this "Request exceeded the limit of 10 internal redirects" - Charlotte_Kihn commented on April 3rd 20 at 18:13
@Charlotte_Kihn, thank you - lolita_Harr commented on April 3rd 20 at 18:16

Find more questions by tags PHPhtaccess