Polls

Which language do you use for website development?
 

Home Remove index.php from URL
Remove index.php from URL PDF
Written by Nirbhab Barat   
Monday, 13 July 2009 21:38

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"

Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
Follow me on twitter
View my LinkedIn profile