views:

21

answers:

1

i want to change this url

localhost/classAds/classInc/home.php

to

localhost/classAds/classInc/home/

for this i created .htacess file as follow,

RewriteEngine On                #Turn on the rewriting engine
RewriteRule     ^home/?$    home.php    [NC,L]   #Handle requests for "home"

and put this file in

C:\wamp\www\classAds and then C:\wamp\www\classAds\classInc

but at both places it did not work,i checked Apache error log but nothing there. actually i an new to this thing.. any idea please??

A: 

You need to name your file .htaccess (two c's) and put it in the root folder of your website to perform the rewrite you require.

RewriteEngine on
RewriteRule ^Home/ home.php [L,NC,QSA]
RewriteRule ^Home home.php [L,NC,QSA]
Sohnee
i just check my apache_error.log and found error something like that [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation, referer: http://localhost/classAds/classInc/any idea please???
shuja
You need to check your root configuration - check out this explanation: http://www.raditha.com/blog/archives/896.html
Sohnee