generate_htaccess
Create .htaccess configuration files for Webasyst projects to manage server settings and URL routing.
Instructions
Сгенерировать .htaccess
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root_path | Yes |
Implementation Reference
- webasyst-mcp.js:1374-1384 (handler)The handler function that generates a basic .htaccess file with Apache URL rewriting rules for Webasyst and writes it to the specified root_path.async function generateHtaccessTool({ root_path }) { const ht = `<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [QSA,L] </IfModule> `; await fs.writeFile(path.join(root_path, '.htaccess'), ht); return { content: [{ type: 'text', text: '.htaccess создан' }] }; }
- webasyst-mcp.js:1808-1808 (registration)Routes incoming tool calls for 'generate_htaccess' to the corresponding handler function in the CallToolRequest handler.case 'generate_htaccess': return await generateHtaccessTool(args);