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

"index.php" in url, if not, don't work


Go to End


15 Posts   8726 Views

Avatar
Ben Gribaudo

Community Member, 181 Posts

4 June 2009 at 12:28am

What's the URL where you want the SS site to appear--i.e. http://your-domain/something/?

Avatar
__fabrice

Community Member, 32 Posts

15 June 2009 at 1:53am

Hi,

Well, it's quite simple, the url looks like : http://localhost/my_site/index.php/accueil instead of http://localhost/my_site/accueil

Fabrice

Avatar
Ben Gribaudo

Community Member, 181 Posts

16 June 2009 at 12:30am

Is your RewriteBase set to "my_site" or "silverstripe/my_site"?

Avatar
quamsta

Community Member, 29 Posts

16 June 2009 at 5:44am

This is happening to one of my sites too. mod_rewrite is installed and enabled. My SS installation is in http://mysite.com/my_installation/,

my .htaccess has

Rewrite Base /my_installation

But I still have to put index.php in the URL as such

http://mysite.com/my_installation/index.php/whatever-page

Avatar
__fabrice

Community Member, 32 Posts

16 June 2009 at 7:43am

Hi,

Thanks. My RewriteBase is "silverstripe/my_site", of course. So, all is ok, but the rewrite mod don't work. Is there a possibility then the rewrite_mod is in fact, not active ?

Fabrice

Avatar
bummzack

Community Member, 904 Posts

16 June 2009 at 7:28pm

I'm quite certain that there's indeed a problem with your mod_rewrite. The index.php URLs are only meant as a fallback for hosts where rewriting isn't supported.
You could try the following: Just after your RewriteBase Line, add the following:

RewriteRule .* http://www.silverstripe.org [R=301,NC,L]

You should be redirected to silverstripe.org whenever you try to visit your site. If not, your mod_rewrite doesn't work properly (maybe you're not allowed to override it via .htacces)

Avatar
kiatng

Community Member, 1 Post

2 October 2011 at 3:34am

Edited: 05/10/2011 3:47am

I just installed SS in a shared host environment. Like the title of this thread, I must have index.php in the URL in order to access the homepage, otherwise it is redirected to http://domain_name/cgi-sys/defaultwebpage.cgi

I am not sure about rewrite at all or if it's disabled, but I have installed other apps (Magento, Joomla, Tiki) on the same host without this problem.

This is a straight install of ver 2.4.5, although it did warn about not sure about rewrite in the pre-install page. I'll check with my host, but let me know if there is something I can do.

[EDIT]
It turned out that I have to clear the history in FF - Ctrl+Shift+Del.

Go to Top