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

vbulletin forum within Silverstripe Root - url misdirection - htaccess?


Go to End


2 Posts   1193 Views

Avatar
Mondi

Community Member, 16 Posts

28 July 2016 at 9:17am

Hi all -

We have a vBulletin 5 installation within a Silverstripe root, loaded into a folder called 'Community'. The url to the community's index file should therefore be: www.e-lumini.com/community. However, the url is automatically appended with ./?url=/community [appearing fully as http://e-lumini.com/community/?] and, of course, redirects to a 404 page.

Presumably, this is an .htaccess content issue.

Anyone an idea on how to deal with this incorrect url redirect issue?

Many thanks in advance -

Raymond Den Otter

Avatar
Mondi

Community Member, 16 Posts

2 August 2016 at 1:33pm

This is my .htaccess in SS root:

### SILVERSTRIPE START ###

# Deny access to templates (but allow from localhost)
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

# Deny access to IIS configuration
<Files web.config>
Order deny,allow
Deny from all
</Files>

# Deny access to YAML configuration files which might include sensitive information
<Files *.yml>
Order allow,deny
Deny from all
</Files>

# Route errors to static pages automatically generated by SilverStripe
ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html

<IfModule mod_rewrite.c>

# Turn off index.php handling requests to the homepage fixes issue in apache >=2.4
<IfModule mod_dir.c>
DirectoryIndex disabled
</IfModule>

SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
RewriteBase '/'

# Deny access to potentially sensitive files and folders
RewriteRule ^vendor(/|$) - [F,L,NC]
RewriteRule silverstripe-cache(/|$) - [F,L,NC]
RewriteRule composer\.(json|lock) - [F,L,NC]

# Process through SilverStripe if no file with the requested name exists.
# Pass through the original path as a query parameter, and retain the existing parameters.

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* framework/main.php?url=%1 [QSA]
</IfModule>
### SILVERSTRIPE END ###