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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:13:02
Script start
Timing: Jan 18 2025 22:13:02
Module start 'layout'
Timing: Jan 18 2025 22:13:02
Module start 'content'
Timing: Jan 18 2025 22:13:04
Module end 'content'
Timing: Jan 18 2025 22:13:04
Script end

Main resources:

Total runtime1.0668 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.1484152.6406
Module start 'layout' 0.00670.0034 741.789139.4766
Module start 'content' 0.01011.0551 781.2656581.3906
Module end 'content' 1.06520.0016 1,362.656312.1484
Script end 1.0667  1,374.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3174160.0002
Check MTime0.00140.1273160.0001
Mysql Total
Database connection0.00100.092010.0010
Mysqli_queries1.015095.1413590.0172
Looping result0.00070.0619570.0000
Template Total1.031396.720.5156
Template load0.00220.205020.0011
Template processing1.029196.461620.5145
Template load and register function0.00060.053210.0006
states
state_id_array0.00110.105210.0011
state_identifier_array0.00140.127420.0007
Override
Cache load0.00180.1685240.0001
Sytem overhead
Fetch class attribute can translate value0.00110.099730.0004
Fetch class attribute name0.00100.098250.0002
XML
Image XML parsing0.00100.092330.0003
class_abstraction
Instantiating content class attribute0.00000.001150.0000
General
dbfile0.00200.1844230.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs