RewriteRule cannot compile regular expression

后端 未结 1 1078
逝去的感伤
逝去的感伤 2021-01-14 05:00

My previous server working fine.. Today I changed new server and getting RewriteRule cannot compile regular expression on my htaccess.

How to fix this line.

相关标签:
1条回答
  • 2021-01-14 05:17

    You are probably using a different Apache version with a different regular expression engine. The Apache versions since 1.3 use POSIX ERE while the versions since 2.0 use PCRE. And only PCRE support the non-capturing group (?:expr).

    So try a pattern without them:

    RewriteRule ^category/([0-9]+)(/([^/]+)(/([^/]+))?)(/([^/]+)(/([^/]+))?)?/$ ./category.php?pid=$1&catname=$3&page=$5 [L]
    
    0 讨论(0)
提交回复
热议问题