WordPress自己的RewriteRule不起作用

时间:2018-06-30 18:45:50

标签: wordpress .htaccess

当我写 my.domain / my / url 时,我想转到其他网页,但是我仍然在 my.domain / my / url ,错误404

while(!(lastDigit)) //if last digit has not been reached
    {
        lastDigit = true;

        for(int k=0; k < array.length; k++) //array contains the numbers we are sorting
        {
            number = k / digitPlace; //digitPlace starts off as 1 to first sort by one's place and is then later multiplied by 10 
            int index = number % base; //get digit from correct place

             digits.add(index, k);//line with the ERROR; add the element in the correct place (according to it's digit)

            if(number > 0 && lastDigit) 
            {
                lastDigit = false;
            }

        }

1 个答案:

答案 0 :(得分:1)

这是您的htaccess问题的答案。您需要像我一样在RewriteBase中添加文件夹。例如,www.domain.com/my/url/是您的wordpress的路径,那么您需要添加/ my / url /来重写base。

   # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /my/url/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wp/index.php [L]
    </IfModule>
    # END WordPress