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.

General Questions

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

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

Problem displaying web with localhost/index.php


Reply

5 Posts   8180 Views

Avatar
Josua

30 January 2012 at 12:25am Community Member, 86 Posts

I installed WampServer on my computer to create my website.
I installed SilverStripe in c:/wamp/www
If I type 'localhost' in the webbrowser, default page (blackcandy) is normally displayed, however, if I type 'localhost/index.php' the page is displayed without format.
If I do the same on a remote web server both forms (www.dominio.com or www.dominio.com/index.php) show the page properly.
Is this normal?
Do I have to configure WAMP in any special way?
I have already enabled Apache rewrite_module.

Attachment 2 pictures that you see all this.

Thanks.

Regards,

Jose A.

Attached Files
Avatar
Pigeon

30 January 2012 at 1:22am Community Member, 243 Posts

The index.php link will be adding that too the bare tag in the html, thus breaking your assets links.

You shouldn't be running with index.php, you can add a rewrite rule to the .htaccess to stop index.php working.

Avatar
Josua

30 January 2012 at 2:43am Community Member, 86 Posts

Thank you for your answer.
But why it works when a remote server?
What rewrite rule should add to the file .htaccess?

Thanks.

Regards,
Jose A.

Avatar
Josua

1 February 2012 at 10:24pm Community Member, 86 Posts

Hello all,

Nobody knows the answer?

Thanks,
Jose A.

Avatar
Pigeon

12 February 2013 at 11:16pm Community Member, 243 Posts

This is the line I use:

RewriteRule ^(home|index\.php)/?$ / [L,R=301,NC]