- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘Other’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi lovers of CSS-Tricks and Chris!
I noticed this article based on what i can only assume removes the https://css-tricks.com/random".html"
from the extension of the url.
https://css-tricks.com/snippets/javascri … avascript/
However i wasn’t sure ? how would i implement this ?
Is there a simple way using htaccess and/or Javascript to simple remove the extension from a url?
I understand you can use the mod_rewrite expression but everytime i try it out i fail!
Maybe chris you could write a very brief tutorial post ?
Much lovex
Mat
Actually, that is done by WordPress.
If you want to do it manually, you just need to create folders, and put the page in it as index.php.
Ex:
domain com/folder-name/index.php
Then you can just accesse page by typing in:
domain com/folder-name/
Enjoy,
Yea this method however means i end up with a massive amount of folders in the ftp lol.
Chris needs to do beginners friendly htaccess tutorial :P
Haha. Yes, that is true.
Another option is to use database driven content and create one file that will decipher which page the visitor wants. Here’s the htaccess that WordPress uses:
This rewrite checks (every time an address is typed into the browser) to see if a file or directory exists already, and if it doesn’t it loads the index.php file (which then figures out what page to display based on the URI).
Cheers!
Gunna have a play with it this weekend!