how can you change a url ending like .html to just the page name?
ross f
2007-03-19 01:03:40 UTC
Just wondering how do you make a page ending on my website from mywebpage.com/news.php to just mywebpage.com/news
i'm a bit stuck so any help would be great, thanks
Three answers:
anonymous
2007-03-19 03:47:50 UTC
create a directory called new , under new create index.php/index.htm
AnalProgrammer
2007-03-19 09:01:20 UTC
First you can change the file name to have no extension. That is it.
So the file
news.html
becomes
news
The problem here is that without the extension your php processor will not recognise the file as being a php type so may not work.
It the file contains only html then there should be no problem with this.
If you are using php then you will have to change the php processing command to process all files.
Twisted Intellect
2007-03-19 10:48:00 UTC
I'd just make a new folder named "news", and put the news.php in there, rename it "index.php", and that way all users trying to reach "yoursite.com/news" would be redirected to "yoursite.com/news/index.php"...
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Search results for 'how can you change a url ending like .html to just the page name?' (Questions and Answers)