我正在尝试使用以下htaccess来获取适用于我网站的SEO友好网址:
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
const fs = require("fs");
pathToAttachment = `${__dirname}/attachment.zip`;
attachment = fs.readFileSync(pathToAttachment).toString("base64");
const msg = {
to: 'test@example.com',
from: 'test@example.com',
subject: 'Subject',
text: 'Sent using Node.js',
attachments: [{
content: data.toString('base64'),
filename: filename,
type: fileType,
disposition: 'attachment',
}, ],
};
sgMail.send(msg).catch(err => {
console.log(err);
});
我希望它改变
RewriteEngine on
RewriteCond %{THE_REQUEST} /yazidetay.php\?yazi_sef=([^&]+)&id=([^\s]+) [NC]
RewriteRule ^ /%1/%2? [NC,L,R]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)/?$ /yazidetay.php?id=$1&yazi_sef=$2 [L]
到
/yazidetay.php?yazi_sef=deneme-yazisi&id=8
但它不起作用。