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>
|