开发者

.htaccess is not working at all

开发者 https://www.devze.com 2022-12-28 12:46 出处:网络
i want to change this url localhost/classAds/classInc/home.php to localhost/classAds/classInc/home/ for this i created .htacess file as follow,

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]   开发者_StackOverflow#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??


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

精彩评论

暂无评论...
验证码 换一张
取 消