Hi I am newbie for making webpage... Just only know basic HTML...
I Have question regarding my website I try to search here but unfortunately i did not get an answer or maybe i don't understand. Can anyone give me a code on my .htaccess or give an idea on how to edit my .htaccess?
I try this code _______________________________ RewriteEngine On RewriteRule (.*)\.html $1 [R=301,L] ________________________________
and it gives me this page error
______________________ The requested URL /home/gpcdcmba/public_html/index was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/220.127.116.1135 mod_jk/1.2.30 Server at www.mydomain.com Port 80 __________________________________________
actually there is already code found in my .htaccess which i change the code above..here is my old code... ______________ # -FrontPage-
<Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName mydomain.com AuthUserFile /home/mydomain/public_html/_vti_pvt/service.pwd AuthGroupFile /home/mydomain/public_html/_vti_pvt/service.grp Options All -Indexes ________________________________
The best help I can give you is to suggest that you start with the mod_rewrite documentation, because you cannot successfully "guess" correct code. The chances that you can get it right by just "trying different things" is essentially zero.
mod_rewrite cannot change a URL. If you wish to change the URLs, then edit the HTML pages to link to extensionless URLs, and then add mod_rewrite code to "map" client requests for extensionless URLs to the correct files with .html extensions.
Note the distinction between URLs and filepaths -- They are not the same thing!
This thread [webmasterworld.com] in our Apache Forum Library includes example code to accomplish the extensionless URL to file mapping.