Web Server Tools
.htaccess & Nginx Rewrite Rule Generator
Visual configuration tool for Apache, LiteSpeed, and Nginx web servers. Generate 301 redirects, HTTP to HTTPS enforcement, canonical www handling, IP blocks, and HTTP security headers with instant code export.
Web Server Configuration Tool
.htaccess & Nginx Rewrite Generator
Core Redirection Rules
Page URL Redirects (301 / 302):
→
public_html/.htaccess Çıktısı:
# --- TREAS Web Yapılandırması (.htaccess) ---
RewriteEngine On
# HTTP -> HTTPS Yönlendirmesi
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# www -> non-www Yönlendirmesi
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# Özel Sayfa Yönlendirmeleri
Redirect 301 /eski-sayfa /yeni-sayfa
# Temel Güvenlik Başlıkları
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "SAMEORIGIN"
Header set X-XSS-Protection "1; mode=block"
Header set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>
ErrorDocument 404 /404.htmlManaged Plesk Hosting & Cloud Servers
Host your PHP and Node.js applications with automated SSL, Nginx reverse proxy, and NVMe speeds.
Plesk Hosting — Ücretsiz SSL & Nginx Desteği
Tek tıkla otomatik SSL sertifikası, Nginx ters vekil mimarisi, PHP sürüm seçici ve kurumsal e-posta altyapısı.
Plesk Paketlerini İnceleLinux VDS — Nginx & Apache Optimizasyonu
Tam root erişimi ile özel Nginx, LiteSpeed veya Caddy yapılandırmalarını sıfır kısıtlama ile yönetin.
VDS Paketlerini Görundefined / SSSSıkça Sorulan
Sıkça Sorulan
Sorular
What is an .htaccess file and where is it located?
An .htaccess file is a directory-level configuration file supported by Apache and LiteSpeed web servers. It allows webmasters to alter server behavior per directory and is typically found in the root website folder such as 'public_html' or 'httpdocs'.
What is the difference between 301 and 302 redirects?
A 301 redirect indicates a permanent move and instructs search engines to pass link equity (PageRank) to the destination URL. A 302 redirect signifies a temporary relocation, telling crawlers to retain the original URL in search indices.
Why doesn't Nginx process .htaccess files natively?
For performance and architecture efficiency, Nginx does not parse runtime per-directory configuration files. Instead, rewrite rules in Nginx must be defined directly inside the server configuration blocks (nginx.conf or vhost configurations) followed by a reload.
Why is enforcing HTTPS redirection important for SEO?
Enforcing HTTPS ensures data integrity and encryption between visitors and your web application. Search engines prioritize HTTPS-secured websites in search result rankings, while modern browsers flag plain HTTP websites as 'Not Secure'.
How do I edit .htaccess in Plesk or cPanel?
Open the File Manager in your control panel, ensure that 'Show Hidden Files' (dotfiles) is enabled in settings, right-click the .htaccess file in your document root, and paste the generated directives directly.