froemken / url_redirect

TYPO3 Extension: Redirect your request URI to another target URI
1 stars 2 forks source link

Domain redirect catches all URLs #13

Open mbrodala opened 7 years ago

mbrodala commented 7 years ago

Given the following setup:

  1. Website is accessed via example.org
  2. A domain redirect is set up to redirect anything for the domain example.com to example.org/com

Requesting the site via example.com correctly redirects to example.org/com.

However, now all URLs redirect to example.org/com, even ones on example.org.

froemken commented 7 years ago

For me a domain redirect redirects from domain a to b and not into a subpath of domain a. Can you show me the aquivalent for that feature in your .htaccess? For now I would prefer a regex redirect to solve that issue.

mbrodala commented 7 years ago

Here's how one would do this in .htaccess:

RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^ https://example.org/com%{REQUEST_URI} [R=301,L]