1
need to maintain two sites in the same hosting (one I developed, let’s call site 01) and another that is a Wordpress created by the old company that served the client (We call site 02).
The directory structure is like this:
- /common (My new website)
- /en (My new website)
- /en (My new website)
- /es (My new website)
- /site02 (Wordpress)
- .htaccess (My new website)
- index.php (My new site)
- web.config (Wordpress)
The web.config makes my site stop working when entering some internal page. When removing web.config and leaving htaccess, who stops is site02. I tried moving web.config into the /site02 directory, but it still didn’t work. It gives some infinite loop errors.
I don’t know what else to do.
My HTACCESS from the Root:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(common|sistema|upload|tubosapolo)($|/) - [L]
RewriteRule !\.(css|js|xml|bmp|swf|flv|ico|html|pdf|woff|ttf|svg|eot|zip|mp3|jpg|png|gif|jpeg|ai|eps|ico)$ index.php [L]
</IfModule>
The content of web config. root:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/tubosapolo/index.php" responseMode="ExecuteURL" />
</httpErrors>
<rewrite>
<rules>
<rule name="Tubos Apolo" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
If I remove my htaccess, site02 works. But my internal site01 pages all go to the 404 of site02. What I don’t understand!
Can someone help me?
web.config
and.htaccess
together ? but one site works with IIS and the other with Apache ?– Augusto
@Augusto I was also surprised, and yes, the two work together without problems. But the idea was to leave only one, in this case, only the . htaccess, but I’m not sure how to transcribe this webconfig to that "language".
– Maykel Esser
This web.config is interfering with the entire hosting environment, and I can’t tell you why. I would like it to affect only the directory/tubosapolo.
– Maykel Esser
In fact what happens is that the input port is IIS. Test stop IIS and make . htacces work with the 2
– dsandrade