Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i have .htacess file but its not working it is giving an error.
Not Found
The requested URL /sites/website/plan_right_website /controller/home/home was not found on this server.


plus how can i nclude the 404,500 in my htaccess file.
this my original url http://localhost/sites/website/plan_right_website%c2%a0/controller/home/home.php[^] i want it to be like this
http://localhost/sites/website/plan_right_website%c2%a0/controller/home/home[^]

What I have tried:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Posted
Updated 16-Oct-18 5:39am
v2
Comments
Kornfeld Eliyahu Peter 15-Oct-18 7:07am    
What is the original URL?
harristars 15-Oct-18 7:41am    
i have updated the question just check
Kornfeld Eliyahu Peter 15-Oct-18 8:07am    
It seem that the rewrite works just fine...
The error states that the rewrote URL can not be found...
So either the URL wrong (looks way too long) or there is no HOME controller/page
harristars 15-Oct-18 8:45am    
inside controller/home/

there is a file called home.php
Kornfeld Eliyahu Peter 15-Oct-18 8:55am    
Maybe that %2c%a0 should not be there?
Or the root wrong?

1 solution

hey working i had to allow access in of .htaccess
in httpd.conf file

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    #AllowOverride None
    AllowOverride All
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900