Forum Moderators: phranque

Message Too Old, No Replies

[.htacess] file extensions to forward slashes

mod_rewrite to edit the appearance of extensions

         

w9914420

12:57 pm on Mar 21, 2005 (gmt 0)

10+ Year Member



[.htacess] file extensions to forward slashes
hi all

I have been trying to grasp the editing of .htaccess files using apaches mod_write module. I have been to their site where examples of usage are given, but im still facing a problem of understand redirects and conditions. let me explain.

I have a scenario where on my server where I want to hide all file extensions including .htm/html and php from the address bar for both accessibility and user reasons.

so for example the code would look something like this im guessing?


PHP code:

RewriteEngine on
RewriteRule ^/(.*) home/view.html$1

I would want the above rule to hide .html
and replace it with a /. The same would also apply for .PhP

To be honest im not sure if this is the right way to go about it, but im looking any examples to this problem. Please any help, advice is welcomed cause im stuck

regards

w9914420

w9914420

9:47 pm on Mar 21, 2005 (gmt 0)

10+ Year Member



sorry people am i asking the wrong questions?