: Web.config WordPress rewrite rules next to Magento I've installed Magento on IIS in folder: E:mydomainwwwroot (I already have it all running correctly). I have no deeper folder magento, I placed
I've installed Magento on IIS in folder: E:mydomainwwwroot (I already have it all running correctly).
I have no deeper folder magento, I placed all files directly in the wwwroot folder, so:
wwwrootapp
wwwrootdownloader
wwwrooterrors
wwwrootincludes
etc...
UPDATE: since I'm on IIS my .htaccess is ignored completely and my web.config rules are used instead. Here's my web.config in folder e:mydomainwwwroot:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Magento SEO: remove index.php from URL">
<match url="^(?!index.php)([^?#]*)(?([^#]*))?(#(.*))?" />
<conditions>
<add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Next, I wanted to install WordPress.
I unzipped all files in folder e:mydomainwwwrootwordpress
Browsed to mydomain.com/wordpress/wp-admin/install.php, where I configured everything for my database.
Everything was installed correctly.
I then navigate to www.mydomain.com/wordpress/wp-login.php where I type my credentials. I seem to be logged in and am redirected to www.mydomain.com/wordpress/wp-admin/ But there I receive an empty page.
I enabled detailed error message in IIS following this article: www.iis.net/learn/troubleshoot/diagnosing-http-errors/how-to-use-http-detailed-errors-in-iis I also checkec with Fiddler and see that I receive a 500 error:
GET /wordpress/wp-admin/ HTTP/1.1
Host: mydomain.com Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36
Referer: www.mydomain.com/wordpress/wp-login.php Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,nl;q=0.6
Cookie: wordpress_fabec4083cf12d8de89c98e8aef4b7e3=floran%7C1381236774%7C2d8edb4fc6618f290fadb49b035cad31; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_fabec4083cf12d8de89c98e8aef4b7e3=floran%7C1381236774%7Cbf822163926b8b8df16d0f1fefb6e02e
HTTP/1.1 500 Internal Server Error
Content-Type: text/html
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.4.14
X-Powered-By: ASP.NET
Date: Sun, 06 Oct 2013 12:56:03 GMT
Content-Length: 0
My WordPress web.config in folder e:mydomainwwwrootwordpress contains:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<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"/>
</rule></rules>
</rewrite>
</system.webServer>
</configuration>
I also want my WordPress articles to be available on mydomain.com/blog instead of mydomain.com/wordpress
Ofcourse my admin links for Magento and Wordpress should also work.
How can I configure my web.config files to achieve the above?
More posts by @BetL925
1 Comments
Sorted by latest first Latest Oldest Best
It might be worth turning on detailed error messages in IIS so you can find out what's causing that 500 error. By default IIS will not show detailed errors unless you're requesting the page from localhost.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.