U
U
ubuntu_lts2020-07-09 12:21:57
htaccess
ubuntu_lts, 2020-07-09 12:21:57

Where did the string ^(.*)$ come from?

Well, I’m watching lesson one there, the author begins to explain the entry point and shows the redirect, that is, he writes first and then with the words: - And now, everything that fell into the pocket (yy) ^(.*)$, then we throw it all. ...... well, there the rules are further where we throw :) I have a question not even in slang (a pocket is there or something else we throw somewhere), but I have a question for the phrase What's all? Where did it come from, how is it? Where is it visible in .htaccess that something got into ^(.*)$ ? Or is it just stupid to know by heart that it somehow gets there and just write the rules?
RewriteEngine On

А теперь всё, что попало в ^(.*)$


Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2020-07-09
@ubuntu_lts

Or is it just stupid to know by heart that it somehow gets there and just write the rules?
I don’t know about any pocket, this is the author’s notion.
It is enough just to understand what is happening in .htaccess (well, or directly in the Apache config) and why it is needed and be able to write regular expressions. ^(.*)$means "any request", I guess that's what they meant.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question