4571 Posts in 1382 Topics by 1376 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1929 Views |
-
"/index.php/" Being Appended to <% base_tag %>

31 March 2010 at 4:30am Last edited: 31 March 2010 4:38am
For some reason, "/index.php/" is being appended to the SS <% base_tag %>, causing the base href, and hence all the URLs, to be funky, as below:
<base href="http://www.mysite.com/index.php/" />
For example,
Obviously, there is no "index.php" folder or page on the site. I've seen this on a few other implementations I've done, and have never been able to figure it out. But since it varies from machine to machine, I have no choice but to think this is some sort of PHP or Apache configuration issue. I have mod_rewrite enabled. What is the issue here?
Thanks,
Garrett -
Re: "/index.php/" Being Appended to <% base_tag %>

31 March 2010 at 7:42pm
A url like http://www.mysite.com/index.php/about-us/ would mean that mod_rewrite has not been detected or is not enabled. Could you post the content of your .htaccess file. Is this a new site or an existing site thats suddenly doing this?
-
Re: "/index.php/" Being Appended to <% base_tag %>

1 April 2010 at 6:30am
Yes, it does seem like a mod_rewrite issue. I never changed my .htaccess file (I think it's pretty much canned SS), but I DID move from Wampserver to my default Apache/PHP install for serving the site(s) [it's happening on All the sites]. I'm running Apache 2.0.63 and PHP 5.2.5. Below is my .htaccess code:
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files><IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /horngroup-prodRewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###I have attached my php.ini and httpd.conf files.
Thanks for your help,
Garrett -
Re: "/index.php/" Being Appended to <% base_tag %>

6 January 2011 at 10:55am
My solution to this problem was to add:
Director::setBaseURL('/');
to my config.
BEWARE, if moving your install to another directory, this must be updated, has caused me a large headache.
| 1929 Views | ||
|
Page:
1
|
Go to Top |



