今天从服务器上下载下来一个joomla项目之后,放在本地机子上运行,结果报这个错误,具体信息如下:
Fatal error: Call to undefined method JDocumentRAW::addCustomTag() in E:/PHPTools/MyXampp/xampp/htdocs/firstProject/libraries/joomla/application/application.php on line 956
从网上搜索答案也没找到满意的,下面这个是个不错的回答,但我前台登录和后台登录都报这个错误,所以也没更正好这个错误,不管怎样,看看下面这篇文章吧,还是蛮不错的。
Joomla 1.5 Search Engine Friendly URLs |
The following tutorial will provide you with a basic overview to enabling the search engine friendly URLs for the latest release of Joomla 1.5 The Joomla! project team have introduced a number of improvements in Joomla 1.5 from an SEO prespective.
The following outlined below are just some of the improvements.
By default without enabling the search engine friendly URLs functionality Joomla! will generate URLs like this
As you can see above the default URL for the frontpage content item includes the long url with the component name and itemid
To change this and enable the search engine friendly url's you have two options.
To enable the SEF functionaly for Joomla 1.5 you need to complete the following
SEF Url's without apache mod_rewrite
To enable SEF Url's on a server which does not support apache mod_rewrite change the search engine friendly URLs checkbox from No to Yes so it looks like the image noted below. Save the changes by selecting the SAVE button. View your web site and the Urls will now look like this As you can see the component name and itemid is now removed from the Url and replaced with the index.php/frontpage
SEF Url's using apache mod_rewrite
A majority of hosting companies include mod_rewrite support as part of the web hosting package. Using this option is the most common approach when using SEF Urls To enable SEF Urls with Mod_Rewrite you need to complete the following.
8. Now select the SAVE button to save your changes. Your URLs will now look like this As you can see the component name, itemid and index.php extension is now removed from the Url's providing you with a clean url title format which clearly reflects the content item.
Add Suffix to URLs
Joomla 1.5 also supports the option to add a suffix .html at the end of the content items. To enable the suffix url option complete the following
2. View your web site again and your Urls will look like this As you can see from the above the .html suffix is now added to the Url
Unique Meta description and keywords
As noted above the default global meta description or keywords are no longer added to each content item. To make each content item you create include a unique meta description and keywords complete the following.
If you do not want the Global site name, global site meta description or global site keywords to appear in each content item you need to complete the above steps for each content item you create.
If you do not do this by default Joomla! will automatically add the meta description and keywords from the global settings to each content item. |