Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 21, 2012 19:59:52 GMT
Hi, I am currently trying to write a .htaccess file to get rid of the .html extensions, but it doesn't seem to work. Here is my code:
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html
Any help would be nice!
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 21, 2012 20:04:33 GMT
Google is your friend
|
|
markbyron
Club 4000 Member
Inactive Server Founder
Server Founder Inactive
Posts: 5,230
|
Post by markbyron on Dec 21, 2012 21:26:37 GMT
I've moved this to our newest forum section - maybe somebody can do better than tell you to google it
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 22, 2012 2:58:14 GMT
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 22, 2012 8:50:51 GMT
Thanks Madgeek, but it didn't work, I suppose its a problem with my host, hopefully they will reply soon and help me out.
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 22, 2012 10:24:46 GMT
As you are using a free host the best way to do it would be to make sub directorys for each page and put the page in there with the name "Index.html" Thats working for me
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 22, 2012 10:41:39 GMT
yeah, but that isn't the proper way of doing things, plus you have a trailing / at the end, resembling that there is pages in that folder.
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 22, 2012 10:55:50 GMT
It depends, for the way ive set my stuff up thats working really well, mayby not for you then!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 26, 2012 21:12:38 GMT
Everything works perfectly for my website? and I use a free host you probably know 000webhost.com here's my website link for proof and it doesn't have a trailing / at the end: www.newworld.comuf.com
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 26, 2012 21:12:53 GMT
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L,QSA]
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 26, 2012 21:13:09 GMT
thats the code I used
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 9:05:07 GMT
you don't have any other pages on your website though polar, so I can't really check.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 9:11:33 GMT
Hex I just added the forums page.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 9:12:38 GMT
ok, but that goes of to a external page, so your .htaccess file won't do jack all to it.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 10:31:50 GMT
Check my website now I just added the about us page
|
|