friendly URLS
#1

guys I have a website with some html docs and I want to create links so that when I type 'http://mydomain.com/news'
which will direct to 'http://mydomain.com/news.html' an idea how I can do this?
Reply
#2

I think with htaccess - ModRewrite
Reply
#3

ok I understand that but how do I use it? :/

Edit: I solved it using this on htaccess:

Код:
RewriteEngine on
RewriteCond %{REQUEST_fileNAME} !-d
RewriteCond %{REQUEST_fileNAME} !-f
rewriterule ^(([^/]+/)*[^./]+)/?$ /$1.html [L]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)