htaccess转Nginx
⚠️ 注意:此工具提供基础转换,复杂规则可能需要手动调整。建议转换后仔细检查并测试。
示例:
URL重写
重定向
访问控制
缓存设置
Gzip压缩
🔄 转换
Apache .htaccess
RewriteEngine On RewriteBase / # Redirect to HTTPS RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Remove trailing slash RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Front controller RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L,QSA] # Cache static files <FilesMatch "\.(jpg|jpeg|png|gif|ico|css|js)$"> Header set Cache-Control "max-age=31536000, public" </FilesMatch>
Nginx配置
复制
🔗 相关工具
⚙
Cron 表达式解析
🌐
CORS 配置生成器
〰️
缓动函数可视化
🎭
API 响应模拟器
➡
箭头符号生成器
▓
ASCII 艺术
A
ASCII 码表
b64
Base64 编解码
🔑
Basic Auth 生成器
◰
Box Shadow 生成器
🗄️
浏览器存储查看器
⚡
CHANGELOG 生成器