---
title: "301 Umstellung in .htaccess wirft 500 Internal Server Error auf"
url: "https://www.typo3.net/d/127836-301-umstellung-in-htaccess-wirft-500-internal-server-error-auf"
source: "typo3.net"
tags: ["Hosting","Server","Frage"]
created: "2019-11-02"
last_reply: "2019-11-02"
replies: 0
solved: false
page: 1
pages: 1
lang: "de"
---

# 301 Umstellung in .htaccess wirft 500 Internal Server Error auf

Hosting › Server · 0 Antworten · gestartet 2019-11-02

## Eröffnungsbeitrag

**design-typo3** · 2019-11-02 · [Beitrag #1](https://www.typo3.net/d/127836-301-umstellung-in-htaccess-wirft-500-internal-server-error-auf/1)

Hallo zusammen,
ich verzweifle grad an der SSL Einstellung und Weiterleitung.

Ich habe im Install-Tool den Haken bei [BE][lockSSL] gesetzt, sobald ich jedoch in die von Typo3 mitgelieferte .htaccess Datei eine Weiterleitung reinschreibe, bekomme ich den 500 Internal Server Error. Habe hier auch schon mehrere Versionen probiert natürlich mit der URL meiner Kundin.

Die .htaccess Datei liegt bei mir im Typo3 Verzeichnis nicht auf der ROOT. Gleiches Spiel jedoch wenn ich es auf die ROOT lege.

Hoffe ihr könnt mir helfen :-)

Hier der Auschnitt:

### Begin: Rewriting and Access ###

# You need rewriting, if you use a URL-Rewriting extension (RealURL, CoolUri).

<IfModule mod_rewrite.c>

# Enable URL rewriting
	RewriteEngine On
	RewriteCond %{SERVER_PORT}     !^443$
	RewriteRule (.*)  https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

# auch schon probiert...
        #RewriteCond %{Server_Port} !^443$
        #RewriteCond %{HTTP_HOST} ^www\.Beispiel\.de$ [NC]
        #RewriteRule ^(.*)$ <https://www.Beispiel.de/$1> [R=301,L]

# Store the current location in an environment variable CWD to use
	# mod_rewrite in .htaccess files without knowing the RewriteBase
	RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
	RewriteRule ^.*$ - [E=CWD:%2]

# Rules to set ApplicationContext based on hostname
	#RewriteCond %{HTTP_HOST} ^dev\.example\.com$
	#RewriteRule .? - [E=TYPO3_CONTEXT:Development]
	#RewriteCond %{HTTP_HOST} ^staging\.example\.com$
	#RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging]
	#RewriteCond %{HTTP_HOST} ^www\.example\.com$
	#RewriteRule .? - [E=TYPO3_CONTEXT:Production]

# Rule for versioned static files, configured through:
	# - $GLOBALS['TYPO3_CONF_VARS']['BE']['versionNumberInFilename']
	# - $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename']
	# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ %{ENV:CWD}$1.$3 [L]

# Access block for folders
	RewriteRule _(?:recycler|temp)_/ - [F]
	RewriteRule fileadmin/templates/.*\.(?:txt|ts)$ - [F]
	RewriteRule ^(?:vendor|typo3_src|typo3temp/var) - [F]
	RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ - [F]

# Block access to all hidden files and directories with the exception of
	# the visible content from within the `/.well-known/` hidden directory (RFC 5785).
	RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
	RewriteCond %{SCRIPT_FILENAME} -d [OR]
	RewriteCond %{SCRIPT_FILENAME} -f
	RewriteRule (?:^|/)\. - [F]

# Stop rewrite processing, if we are in the typo3/ directory or any other known directory
	# NOTE: Add your additional local storages here
	RewriteRule ^(?:typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]

# If the file/symlink/directory does not exist => Redirect to index.php.
	# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteCond %{REQUEST_FILENAME} !-l
	RewriteRule ^.*$ %{ENV:CWD}index.php [QSA,L]
</IfModule>

Schöne Grüße
Sylvia

---

Quelle: „301 Umstellung in .htaccess wirft 500 Internal Server Error auf“, typo3.net, https://www.typo3.net/d/127836-301-umstellung-in-htaccess-wirft-500-internal-server-error-auf
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
