Redirect all but 2 links to new URL

I have domain.de and domain.com. In the past I have used both domains, but now I want to use only the domain.de and domain.com should redirect to domain.de/en. But there are 2 links which need to be domain.de/api/xx1 + domain.de/api/xx2 (so without the /en). I tried the following: <If “%{HTTP_HOST} = ‘domain.com'”> Redirect /api/xx1 http://domain.de/api/xx1 Redirect /api/xx2 http://domain.de/api/xx2 Redirect /…
Read more

CDNS Access-Control-Allow-Origin issue

hello all i am using cdns to host my images on another server what issue i am getting with my font icons are Font from origin ‘http://www.domain.com’ has been blocked from loading by Cross-Origin Resource Sharing policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://control.domin2.com’ is therefore not allowed access. please suggest me smething i am lost…
Read more

subdomain redirection to domain , and keep url paths in htaccess

I got a subdomain http://wwww.sub.domain.com I want all links from this subdomain be redirected to a target domain with www, nonwww and also redirect the path. REDIRECT: www = http://www.sub.domain.com path = http://sub.domain.com/something/anything to TARGET: http://www.domain.com/something/anything I used : RewriteEngine On RewriteCond %{HTTP_HOST} ^sub.domain.com$ [NC] RewriteRule ^(.*)$ https://www.domain.com%{REQUEST_URI} [R=301,NC,L,QSA] its not wokring as excepted , what did i missed here…
Read more

htaccess file extension hiding and pass url string

I am trying to hide .php extension and also rewriting the url string with trailing slashes. File extension hiding is working fine but url string is not. From: http://www.example.com/abc.php?id1=1&id2=2 To: http://www.example.com/abc/id1/1/id2/2 Following is my .htaccess RewriteEngine On Options -Multiviews RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)$ $1.php [NC,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{QUERY_STRING} (.*) RewriteRule ^(.*)/([0-9]+)$…
Read more

This domain is established to be used for illustrative examples

Okay i am trying (still) to setup prerender. and now ive added the following config in my htaccess: GNU nano 2.2.6 File: .htaccess <IfModule mod_headers.c> RequestHeader set X-Prerender-Token “myTokenThatsValid” </IfModule> <IfModule mod_rewrite.c> RewriteEngine On <IfModule mod_proxy_http.c> RewriteCond %{HTTP_USER_AGENT} baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora link preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator [NC,OR] RewriteCond %{QUERY_STRING} _escaped_fragment_ # Only proxy the request to Prerender if it’s a request for HTML RewriteRule ^(?!.*?(.js|.css|.xml|.less|.png|.jpg|.jpeg|.gif|.pdf|.doc|.txt|.ico|.rss|.zip|.mp3|.rar|.exe|.wmv|.doc|.avi|.ppt|.mpg|.mpeg|.tif|.wav|.mov|.psd|.ai|.xls|.$…
Read more

How to prevent Apache from continuing to evaluate rewrite rules after a match?

I have, amongst others, the following rewrite rules in the .htaccess file in the root directory: … RewriteRule ^/de/Artikel-Alle-Kategorien.html$ /art-cat.php?plng=de [L] … RewriteRule ^/de/Artikel-([a-zA-Z,-_]+).html$ /art-item.php?plng=de&c=$1 [L] … When the URL “…/de/Artikel-Alle-Kategorien.html” is requested, the rule that gets applied is the second of the above although the first is an exact match. The result is a list of error messages pertaining…
Read more

Redirect without get-params

I need to remove get params from url-string.There is code from .htaccess: RewriteRule ^page,([0-9]+),([^/]+).html$ index.php?do=static&page=$2&news_page=$1 [L] RewriteRule ^print:([^/]+).html$ engine/print.php?do=static&page=$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+).html$ index.php?do=static&page=$1 [L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/ RewriteRule ^index.php$ http://example.com? [R=301,L] Afer redirecting, in url string appears parametrs ?do=static&page=’page name’. When I add next code paramets disappering,but content in browser isn`t loading: RewriteCond %{QUERY_STRING} !=”^do=static$”…
Read more

Configur Magneto Inside another Magento folder

I want to configure Magento site inside sub folder but parent folder also have Magento site. For example: app/ skin/ media/ js/beta/ …/ …/ I want to configure Magento inside beta folder but due to parent magneto .htaccess, beta URL doesn’t work. Only home page loads but further links are not working. Source: .htaccess