Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress重定向到xampp';除主页外的仪表板_Php_Wordpress_Apache_.htaccess - Fatal编程技术网

Php Wordpress重定向到xampp';除主页外的仪表板

Php Wordpress重定向到xampp';除主页外的仪表板,php,wordpress,apache,.htaccess,Php,Wordpress,Apache,.htaccess,我的系统是MAC,我正在为MAC运行Xampp 我搜索了很多解决方案,我想这一定是因为我的.htaccess文件丢失了,wordpress中的所有其他链接,甚至我的帖子,页面,除了我的主页重定向到localhost/dashboard,这是xampp的仪表板 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wordpress RewriteRule ^index\.php$ - [L]

我的系统是MAC,我正在为MAC运行Xampp

我搜索了很多解决方案,我想这一定是因为我的.htaccess文件丢失了,wordpress中的所有其他链接,甚至我的帖子,页面,除了我的主页重定向到localhost/dashboard,这是xampp的仪表板

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
#开始WordPress
重新启动发动机
重写BASE/wordpress
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
#结束WordPress
这是我的.htaccess文件,我已经设置好了

<Directory />
    AllowOverride all
    Require all denied
</Directory>

允许超越所有
要求全部拒绝
在apache
httpd.conf
文件中


现在我还能做什么?我被这个困住了,甚至当我在我的wp管理页面上点击永久链接时,它显示找不到对象,404错误。页面退出,帖子存在,所有内容都存在,但我仍然只能看到主页。

由于WordPress似乎位于/WordPress/,请更改
重写规则/index.php[L]
重写规则/wordpress/index.php[L]

经过数小时的搜索,我发现我需要为我的根wordpress文件夹授予写权限,因此它是由

sudo chmod -R 777 wordpress

应该是这样的

#开始WordPress
重新启动发动机
重写BASE/wordpress/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/wordpress/index.php[L]

#结束WordPress
完美,为我工作