Php Wordpress重定向到xampp';除主页外的仪表板
我的系统是MAC,我正在为MAC运行Xampp 我搜索了很多解决方案,我想这一定是因为我的.htaccess文件丢失了,wordpress中的所有其他链接,甚至我的帖子,页面,除了我的主页重定向到localhost/dashboard,这是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]
# 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>
允许超越所有
要求全部拒绝
在apachehttpd.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
完美,为我工作