Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Silverstripe with wordpress


Go to End


2 Posts   1167 Views

Avatar
pcknights2

Community Member, 4 Posts

15 September 2014 at 7:44pm

Edited: 16/09/2014 6:07pm

Hi Everyone
I am in desperate need of some help
I have a website in silverstripe and I am trying to install magento into a folder (/blog)
but when i type websitename/blog I get Sorry, 'it seems you were trying to access a page that doesn't exist.'
I am able to login as administrator if I type in websitename/blog/wp-admin/index.php
but I am not able to see the front end. I tried websitename/blog, websitename/blog/index.php none works.
If I change the index.php to index2.php I am able to see the front page websitename/blog/index2.php, but as you can understand none of the links works.
in the .htaccess in the root folder i have the code below.
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

<Files web.config>
Order deny,allow
Deny from all
</Files>

ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html

<IfModule mod_alias.c>

RedirectMatch 403 /silverstripe-cache(/|$)

</IfModule>
<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
# Canonicalization
RewriteCond %{HTTP_HOST} !^www\.3x1\.com
RewriteRule (.*) http://www.sitename.com/$1 [R=permanent,L]
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1 [QSA]
RewriteCond %{REQUEST_URI} ^(.*)/sapphire/main.php$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . %1/install.php? [R,L]
</IfModule>
### SILVERSTRIPE END ###

in the .htaccess in the websitename/blog folder I have
# Switch rewrite engine off in case this was installed under HostPay.

RewriteEngine Off

SetEnv DEFAULT_PHP_VERSION 53

DirectoryIndex index.cgi index.php

# BEGIN WordPress

# END WordPress

I have tried lots of things nothing worked
Please I someone give me some hints.

Avatar
pcknights2

Community Member, 4 Posts

16 September 2014 at 1:51am

Edited: 16/09/2014 6:07pm

The website is hosted in IIS and someone told me that IIS uses web.config instead of .htaccess
bellow is the code for web.config in the root folder
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
</files>
</defaultDocument>
<rewrite>
<rules>
<clear />
<rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions logicalGrouping="MatchAll">
<add input="{REMOTE_ADDR}" negate="true" pattern="127.0.0.1" />
<add input="{URL}" pattern="*.ss" />
</conditions>
<action type="CustomResponse" statusCode="403" />
</rule>
<rule name="SilverStripe Clean URLs" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="sapphire/main.php?url={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>