Crawlable AJAX with _escaped_fragment_ in htaccess

后端 未结 5 605
情深已故
情深已故 2021-01-02 19:45

Hello fellow developers!

We are almost finished with developing first phase of our ajax web app. In our app we are using hash fragments like:

http://         


        
5条回答
  •  -上瘾入骨i
    2021-01-02 20:14

    Your forgot QSA directive (everyone missed the point =D )

    RewriteCond %{QUERY_STRING} ^_escaped_fragment_=(.*)$
    RewriteRule ^$ /webroot/crawler.php%1 [QSA,L]
    

    By the way your $1 is well err... useless because it refers to nothing. So this should be:

    RewriteCond %{QUERY_STRING} ^_escaped_fragment_=(.*)$
    RewriteRule ^$ /webroot/crawler.php [QSA,L]
    

    Tell me if this works.

提交回复
热议问题