joomla网站搭建完成,上传服务器,域名可以访问之后,接下来面临的问题就是网站SEO优化,以及百度抓取,排名等等。
所以需要把动态的网站通过Apache重写rewrite的方式,实现(伪)静态页面输出:
(1)需要在joomla全局设置
然后出现访问错误:
(2)在Apache中的httpd.conf中修改:
①将 #LoadModule rewrite_module modules/mod_rewrite.so 修改为 :LoadModule rewrite_module modules/mod_rewrite.s
②将httpd.conf里面的里面AllowOverride None 更换为 : AllowOverride All
③将httpd-vhosts.conf里面的里面AllowOverride None 更换为 : AllowOverride All
④将joomla网站目录中的hatcess.txt,更改为.hatcess文件,并修改其内容
#RewriteBase / -> RewriteBase /
RewriteCond %{REQUEST_URI} !^ /index\.php -> RewriteCond %{REQUEST_URI} !^ /项目文件夹名字/index\.php
走自己的路,让别人说去吧