- eZ Platform
- PHP 5.6+
Add the following to your composer.json and run php composer.phar update novactive/ezseobundle
to refresh dependencies:
# composer.json
"require": {
"novactive/ezseobundle": "2.x",
}
Activate the bundle in ezpublish\EzPublishKernel.php
file.
// ezpublish\EzPublishKernel.php
public function registerBundles()
{
...
$bundles = array(
new FrameworkBundle(),
...
new Novactive\Bundle\eZSEOBundle\NovaeZSEOBundle(),
);
...
}
Make sure you add this route to your routing:
# ezpublish/config/routing.yml
_novaezseoRoutes:
resource: "@NovaeZSEOBundle/Controller/"
type: annotation
prefix: /
CREATE TABLE `novaseo_meta` (
`objectattribute_id` bigint(20) unsigned NOT NULL,
`meta_name` varchar(255) NOT NULL,
`meta_content` text(255) NOT NULL,
`objectattribute_version` int(10) unsigned NOT NULL,
PRIMARY KEY (`objectattribute_id`,`objectattribute_version`,`meta_name`),
KEY `novaseo_idx_content` (`objectattribute_id`,`objectattribute_version`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Add a #
at the beginning of the line
#rewrite "^/robots\.txt" "/robots.txt" break;
#RewriteRule ^/robots\.txt - [L]