Questions tagged [htaccess] (2144)

1
answer

Why not 301 redirect?

Redirect only the home page. htaccess: RewriteEngine On RewriteCond %{HTTPS} =off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L] RewriteCond %{HTTP_HOST} ^www\.kalkulyator\.life$ [NC] RewriteRule ^(.*)$ https://kalku.ru/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^kalkulyator\.life RewriteRule ^(.*)$ https://kalku...
Boris_Ebert asked April 4th 20 at 14:21
1
answer

"bad channel CORS preflight" — how to solve?

Good afternoon. In .htaccess add the following headers: <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" Header always set Access-Control-Allow-Headers "append,delete,entries,foreach,get,has,keys,set,values,Authoriz...
teagan_Koch asked April 4th 20 at 14:21
2
answers

How to do a mass redirect to the 2nd level of nesting?

Hello! Asking for help: Is it possible somehow to do a mass redirect to the 2nd level of nesting? For MODX made the nested url to the 2nd level (without sub-categories). But the pages before that were indexed with the full url, respectively in the transition they get a 404. Need to do like this: with site.ru/catalog/subca...
Neha.McKenz asked April 4th 20 at 14:19
2
answers

Redirect to https all pages except the main?

Help with redirect rule. 1 - you Need to do a redirect of all except index.html c http to https 2 - and is it possible to redirect to open index.html not index.php And I should add that all this is on WordPress, you never know.
Greyson_K asked April 4th 20 at 14:16
2
answers

How to make a proper redirect from the blocked site to another?

If the site is blocked by Roskomnadzor, how to do a proper redirect so that the redirect work? For some reason, when the usual was redirected't have time to work, you can listen to the restriction from the provider. Redirect is only triggered when you enable VPN. But it was noticed on other sites (with lock Roskomnadzor) ...
Angie.Kuhic asked April 4th 20 at 13:54
2
answers

How to add js file in all pages?

You need to add on all pages of the website, including nested subfolders, script .js Adding in the footer, for example, I do not cover other folders of the site and the page where the footer is not connected. There is an option to add the file via root .htaccess or other file was added .js?
louisa asked April 4th 20 at 13:53
0
answer

How to make a CNC using .htaccess?

Hello! Faced with such a problem. Can not using htaccess to change the reference. There is such a link 1. sitename.ru/ru/news/index.php?id=1579862792 2. sitename.ru/events/index.php?id=1579862792 How to make these links: 1. sitename.ru/ru/news/1579862792/ 2. sitename.ru/events/1579862792/ Thank you for your time.
Brando asked April 4th 20 at 13:41
1
answer

How to add a rule that it applied for the domains of the 3rd level?

There is a rule to redirect http and https www to non-www, but it does not work for domains of the 3rd level, and Supplement correctly I don't know. RewriteCond %{HTTP_HOST} . RewriteCond %{HTTP_HOST} ^www\.(.+)$ RewriteRule (.*) https://%1/$1 [R=301,L]
Elissa.Bau asked April 4th 20 at 13:26
0
answer

A 301 redirect with the publication on the same domain on the same on the other?

Good day! Tell me how to write HTACCESS rules in a situation where there is a SITE1.RU with different themes. Created a website SITE2.RU to automotive topics. From site 1 all the auto news was moved to Site 2 , but Site 1 all removed. As it is now right to set up a redirect from Site 1 to Site 2 for moved articles? This cou...
jared asked April 4th 20 at 12:59
1
answer

Error connecting styles due to Router a?

There is a problem, do not plug styles on other pages. 1. The structure of my project. project ==app =views =layouts =default.php ( Standard pattern: Hader and footer in Hadera connect styles.) =Main =index.php ( displays content ) =public =css =js =index.php( This is the entry point to an application that requests ...
georgette.Fay asked April 4th 20 at 12:55