小编Tif*_*any的帖子

prerender.io .htaccess 变量 - Reactjs CRA

我为 CRA 设置了 prerender.io 并且它运行良好,但是当机器人点击没有参数的 URL 时,它会放在 URL 的末尾 - 字符串“.var”

在此处输入图片说明

我尝试了 (.*) 的变体,但似乎不起作用。有任何想法吗?

这是 .htaccess 文件

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

<IfModule mod_headers.c>
    RequestHeader set X-Prerender-Token "TOKEN"
    RequestHeader set X-Prerender-Version "prerender-apache@2.0.0"
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On
    <IfModule mod_proxy_http.c>
        RewriteCond %{HTTP_USER_AGENT} googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest\/0\.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp [NC,OR]
        RewriteCond %{QUERY_STRING} _escaped_fragment_
        RewriteCond %{REQUEST_URI} ^(?!.*?(\.js|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent|\.ttf|\.woff|\.svg))

        RewriteRule ^(index\.html|index\.php)?(.*) https://service.prerender.io/%{REQUEST_SCHEME}://%{HTTP_HOST}/$2 [P,END]
    </IfModule>
</IfModule>
Run Code Online (Sandbox Code Playgroud)

.htaccess prerender reactjs cra

6
推荐指数
1
解决办法
107
查看次数

Apply parent mouse events to child elements

I am making little Windows Forms Application.
\nI have PictureBox (parent) and Label (child) in it.

\n

The Parent\'s Mouse Events are working perfectly, but Mouse events generated by child elements are not reflected on the Parent. The Cursor also changes back to its default (arrow).

\n

Is it possible to pass events generated by child Controls, e.g., the MouseEnter event, to the Parent Control?

\n
public partial class Form1 : Form\n{\n    public Form1()\n    {\n        InitializeComponent();\n\n        Card.MouseEnter += new EventHandler(Card_MouseEnter);\n …
Run Code Online (Sandbox Code Playgroud)

c# parent custom-controls mouseevent winforms

5
推荐指数
1
解决办法
1001
查看次数