Alright, I know the question is kind of a doozy but I'm running out of options.

I've uploaded my Craft install to the subdirectory website.com/travel and left in the base web.config that comes with Craft:

<?xml version="1.0" encoding="UTF-8"?>
                <rule name="Rewrite" stopProcessing="true">
                    <match url="(.+)" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                        <add input="{URL}" pattern="^/(favicon\.ico|apple-touch-icon.*\.png)$" negate="true" />
                    <action type="Rewrite" url="index.php?p={R:1}" appendQueryString="true" />
        <urlCompression doStaticCompression="true" doDynamicCompression="true" />
                <clear />
                <add value="index.php" />
                <add value="index.htm" />
                <add value="index.html" />

I've also moved the Craft/ directory right next to travel/'s index.php.

Visiting website.com/travel/about takes me to Wordpress' 404, however website.com/travel/index.php/about takes me to the correct page.

However, visiting the cp at website.com/travel/index.php/admin removes index.php from the url (but still gives me a Wordpress 404).

I've also tried /index.php/ and /index.php?p= but both results are the same.

I'm not very well-versed in IIS or web.config settings, so I've just been trying things randomly to no avail. Is there something I am missing?

  • 1
    Does Wordpress have its own web.config in the parent folder? web.config files are just like .htaccess files in that they inherit rules from their parent files. – Brad Bell Oct 2 '15 at 1:01
  • It does, but I also disabled inheritance, so it's not governed by the parent directory. – Rob Erskine Oct 2 '15 at 13:48
  • Shot in the blind, but have you tried adding the subdirectory to the rewrite, like <action type="Rewrite" url="travel/index.php?p={R:1}" appendQueryString="true" />? Might also try only matching whatever is after travel in the url with something like <match url="^travel/(.+)" ignoreCase="false" /> – megatrond Oct 3 '15 at 17:20
  • 1
    Thanks for the response @megatrond. It turns out this was a server config issue (not on my end at all). The sys admin did something on the windows and then it started to work. I will try and follow up with my contractor to see if I can get an adequate answer to respond to my original question. – Rob Erskine Oct 4 '15 at 23:49
  • Would leave to hear the results, @RobErskine! – Brad Bell Oct 5 '15 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.