Hi all, I have made a website in html of which I would like to change URL. I want to make : mywebsite.com/index.html to mywebsite.com and remove .html from all other pages like: mywebsite.com/contact.html to mywebsite.com/contact Please help
To do that, place each file in its own appropriately named directory. Rename the file index.html. Thus: example.com/ delivers the home page example.com/aboutus/ delivers the index.html page in that directory as the aboutus page. Don't forget the trailing virgule. cheers, gary
RewriteEngineOn RewriteCond%{REQUEST_FILENAME}!-f RewriteCond%{REQUEST_FILENAME}!-d RewriteRule^(.*)\.html$ /$1 [L,R=301] try that in .htaccess Nigel
He is obviously new. Let me break this down for you. htaccess is a file you create in your main directory. It lets you drop file names and manipulate URLs for purposes such as SEO. To begin create a file called .htaccess. This means put nothing ahead of the dot, I'm not talking about something like .htaccess.txt. The file literally has no name. After you create your file open it in your favorite text editor and place Nigel's code in. Now you URLs will look like this if all files are in the same directory: Index: domain/ Random page: domain/random-page/ Profit???: domain/profit/ Enjoy!