Question: |
Good day, it is impossible to set up a redirect from folder to subdomain i.e. imperiya.info/polio on polio.imperiya.info for this purpose we used a 301 redirect in the subdomain folder I used this command:RewriteCond %{HTTP_HOST} ^imperiya\\.info$ [NC]RewriteRule ^\\/polio\\/(.*)$ http://polio.imperiya.info/$1 [R=301,L]what could be the reason?thanks in advance |
Answer: |
Hello. tested Here is the redirect: RewriteCond %{HTTP_HOST} ^(ww+\\.)?xn--l1adgmc\\.xn--80aicbpikfrbqwfi\\.xn--p1ai RewriteCond %{REQUEST_URI} !/forum/ RewriteRule ^(.*)$ /forum/$1 [QSA,L] This redirect subdomain to folder. File .htaccess is in the public_html folder. |
Question: |
and Vice versa this redirect works? ie from folder to subdomain? |
Answer: |
this redirect from a folder of the main domain is redirected to the folder of the subdomain, i.e. no matter in which folder the files from the residence, at the address set subdomain they will open from the folder of the subdomain. On the contrary how you want to organize a redirect? |
Question: |
ie imperiya.info/polio on polio.imperiya.info this register should help, with the condition that .htaccess is in the root of the main domain (imperiya.info) ? |
Answer: |
no .htaccess should be in the folder in which you want to do a redirect |
Answer: |
The domain imperiya.info |
Answer: |
In what folder you have configured - polio.imperiya.info |
Question: |
After the above-mentioned operations in the folder polio out error, Internal Server Error which is not essese even after htaccess back to its original state:In what could be the reason?RewriteEngine On# BEGIN iThemes Security - Do not modify or remove this line# iThemes Security Config Details: 2 # Enable the hide backend feature - Security > Settings > Hide Login Area > Hide Backend RewriteRule ^(/)?ipanel/?$ /wp-login.php [QSA,L]# END iThemes Security - Do not modify or remove this line# BEGIN WordPressRewriteEngine OnRewriteBase /RewriteRule ^index\\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]# END WordPress |
Answer: |
how You edited Fazl? in what editor? |
Question: |
NOTEPAD ++ |
Answer: |
then save without BOM |
Question: |
site running, thank you, but rediction does:RewriteCond %{HTTP_HOST} ^(ww+\\.)polio\\.imperiya\\infoRewriteCond %{REQUEST_URI} !/polio/RewriteRule ^(.*)$ /polio/$1 [QSA,L]doesn`t help |
Answer: |
the redirect should not collectivate with forwarding rules of the site |
Question: |
when registere cPanel goes through the error failed to add the redirect, as I am having the following error:Redirecting \"polio\" to \"http://polio.imperiya.info\" will cause a redirection loop because \"http://imperiya.info/polio\", which is located at \"/home/imperiya/public_html/polio\", is above \"http://polio.imperiya.info\", which is located at \"/home/imperiya/public_html/polio\" . |
Answer: |
you can`t redirect via the panel, you will break the redirect of the engine. the panel does the same thing, changes the file .htaccess ? if it is already nxj that is, it is caution to ruin |
Question: |
then how to do? already tried all the standard codes that work on other sites, and there is not what |
Answer: |
you have the examples working as You need on other sites? maybe such a redirect will not work because WP has its own redirects |
Question: |
The examples I threw in the first message |
Answer: |
where you have worked such a redirect? from a folder on your domain? |