Tuesday, February 05, 2008

Remove index.php

Backup httpd.conf file of apache, all the changes has to be done in this file.

search for "LoadModule rewrite_module modules/mod_rewrite.so" and

remove # from the "#LoadModule rewrite_module modules/mod_rewrite.so" string. Removing '#' from the above line will actually enable the rewrite module on server.

paste the following, if not there

<FilesMatch "^\.ht">

Order allow,deny

Deny from all

</FilesMatch>


paste the following, if not there

AccessFileName .htaccess

above line will use the file name to use, will rewriting.

paste the following, if not there

IndexIgnore .htaccess

above line will remove the .htaccess from the indexing service of apache

AND THE MOST IMPORTANT TASK

search for this :

<Directory />

Options FollowSymLinks

AllowOverride None

Order deny,allow

Deny from all

Satisfy all

</Directory>



and replace by :


<Directory />

Options FollowSymLinks

AllowOverride all

Order deny,allow

Deny from all

Satisfy all

</Directory>


'all' string will allow the mod_rewrite to run for all the requests coming to server.



create one .htaccess file, you won't be able create such file in windows system, so WAMP user download it from any web server. or find some other source.



and paste following in the .htaccess file.

RewriteEngine on

RewriteCond $1 !^(index\.php|images|robots\.txt)

RewriteRule ^(.*)$ /index.php/$1 [L]


if using CI in some directory than use

RewriteEngine on

RewriteCond $1 !^(index\.php|images|robots\.txt)

RewriteRule ^(.*)$ /directory_name/index.php/$1 [L]


don't forget to restart the apache server, so that it reloads the httpd.conf file.


creating an alias(ignore these lines):
Alias /something "/www/webapps/joomla"

No comments: