Переделать плагин WordPress MU Domain Mapping
Нужно переделать плагин WordPress MU Domain Mapping
Есть Wordpress Multisite, необходимо дописать плагин таким образом, чтобы при вводе IP в браузерной строке - редиректило не на domain.name/wp-signup.php?new=(IP) - а на урл сайта
-

Раз по IP идет запрос к вашему сайту, то у вас скорее всего сервер (VPS/VDS), а не хостинг.
Наилучший вариант в этом случае не костыль с плагином, а прямое указание веб-сервера.
Создайте виртуальный хост:
<VirtualHost *:80>
ServerName default
DocumentRoot /var/www/html/default
</VirtualHost>
а в папку /var/www/html/default положите файл index.php, в котором можете прописывать какие угодно условия переадресации. (папка может быть любая).
Если же у вас все таки хостинг с выделенным IP, то лучше поколдовать с .htaccess.
Что-то типа такого:RewriteEngine OnRewriteCond %{HTTP_HOST} ^11\.11\.11\.111$ [NC,OR]RewriteCond %{HTTP_HOST} ^([a-z.]+)?mydomain\.com$ [NC]RewriteCond %{HTTP_HOST} !^www\. [NC]RewriteCond %{SERVER_PORT} 80RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L]
Но в любом случае, не стоит решать задачу, которая требует 5-10 строк кода, установкой целого плагина. Пусть даже он пропишет только эти самые 10 строк кода, но еще он натащит с собой файлов регистрации в системе, файлы админпанели, деинсталлятор, и пр. -
Current freelance projects in the category PHP
Modules for a website on Laravel
90 USD
Delivery and payment module for the site https://novabook.top/ (Botble CMS / Laravel) Add convenient delivery and payment methods (including installment plans) in the checkout, similar in style and convenience to the mirson ua site.Delivery (mandatory) Nova Poshta Branch… Javascript and Typescript, PHP ∙ 7 minutes back ∙ 2 proposals |
Integration needed: KeyCRM → Cash Register KashalotIt is necessary to set up integration between KeyCRM and the Cash Register Kahalot. When placing an order in KeyCRM, the data must be automatically transmitted to Kahalot: • order information • products, nomenclature • prices • quantity More details in private. Content Management Systems, PHP ∙ 1 day 23 hours back ∙ 27 proposals |
Development of 2 SEO-oriented websites for selling spare parts (ATVs and special equipment)Development of Two Specialized Websites for Selling Spare PartsGeneral Information It is necessary to develop two specialized websites: Spare parts for ATVs, UTVs, SSVs, and other similar equipment. Spare parts for special equipment. Existing company website:… PHP, Web Programming ∙ 4 days 6 hours back ∙ 77 proposals |
Development of a WordPress website
23 USD
We are looking for a contractor to develop a custom website on WordPress for a jewelry store. The first stage will be a consultation. Content Management Systems, PHP ∙ 6 days 22 hours back ∙ 74 proposals |
Parser expireddomains.net
112 USD
A parser is needed for expireddomains.net. You need to log in to the site first; the problem is that it blocks the IP when trying to parse data. You need to parse thematic domains based on a list of keywords. If you are not confident in your abilities, please do not write. PHP, Web Programming ∙ 9 days 6 hours back ∙ 53 proposals |