Forums / Install & configuration / removing index.php from url

removing index.php from url

Author Message

Halvor M

Friday 06 January 2006 12:35:25 pm

I am trying to manage my URLs, making them shorter.

www.site.com/index.php/corporate/article/name_of_article

I want to remove the /index.php/ (and if possible, the /corporate/ as well)

This is my virtualhost setup (site.com substituted for my site)

NameVirtualHost *:80
<VirtualHost *:80>
  <Directory "D:/www/_site">
    Options FollowSymLinks Indexes ExecCGI
    AllowOverride None
  </Directory>

<IfModule mod_php4.c>
        php_admin_flag safe_mode Off
        php_admin_value register_globals 0
        php_value magic_quotes_gpc 0
        php_value magic_quotes_runtime 0
        php_value allow_call_time_pass_reference 0
    </IfModule>
 
    DirectoryIndex index.php
 
    <IfModule mod_rewrite.c>
        RewriteEngine On
        Rewriterule ^/var/storage/.* - [L]
        Rewriterule ^/var/[^/]+/storage/.* - [L]
        RewriteRule ^/var/cache/texttoimage/.* - [L]
        RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
        Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
        Rewriterule ^/share/icons/.* - [L]
        Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
        Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
        RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
        RewriteRule ^/favicon.ico - [L]
        RewriteRule ^/robots.txt - [L]
        # Uncomment the following lines when using popup style debug.
        # RewriteRule ^/var/cache/debug.html.* - [L]
        # RewriteRule ^/var/[^/]+/cache/debug.html.* - [L]
        RewriteRule .* /index.php
    </IfModule>

  ServerAdmin root@localhost
  DocumentRoot "D:/www/_site"
  ServerName www.site.com
  ServerAlias www.site.com
</VirtualHost>

Gurudutt Verma

Monday 09 January 2006 12:27:08 am

Hi Halvor

Please try to change following setting settings in your site.ini

I guess you are using MatchOrder=uri in site.ini

1. Change it to host or port in site.ini
[SiteAccessSettings]
MatchOrder=host

2. set DefaultSiteAccess name in site.ini file
[SiteSettings]
DefaultAccess=corporate

This should fix the things.

André R.

Wednesday 11 January 2006 7:02:26 am

but that dosn't remove index.php does it ??

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom