Forum Moderators: phranque
If you want to post again and define more precisely what specific functions you need, we might be able to provide a better answer.
Jim
For ex.. domain test.com and in the web directory we have several HTML files with names test.html, name.html, place.html etc (all the files end with .html). Now anyone access the file using [test.com...] --> the browser should show the file [test.com...] .
[test.com...] ---> [test.com...] like wise
Is that can be done?
Thanks!
Manju
# IF requested URL has no filetype or ending slash
# RewriteCond $1 !(\.[a-z0-9]+¦/)$ [NC]
# AND IF requested URL resolves to a non-existent file
RewriteCond %{REQUEST_FILENAME} !-f
# AND IF file exists after ".html" is appended
RewriteCond %{REQUEST_FILENAME}.html -f
# THEN rewrite the requested URL to an .html file
RewriteRule (.+) /$1.html [L]
I assume you already have an .htaccess file in that directory with working rules in it. If not, then you may need to add all or some of these lines ahead of the code above:
Options +FollowSymLinks
RewriteEngine on
Jim