Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Remove .html/.php from URL

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #146198
    rkhayat
    Participant

    Hello CSS-tricks,

    I have been trying to remove .php/.html from my url but I seem to be having trouble.

    I followed the example post in Here

    my .htaacces file is in my main folder. Website = http://www.dnwebdev.com

    \RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^(.*)$ $1.html <h1>Replace html with your file extension, eg: php, htm, asp</h1> 

    \

    I would appreciate some help, I am a front end developer so this server side is very confusing to me.

    Edit: I link my urls with…

    <

    pre> `<a href="index.html" id="current">Home</a>
    </code></pre>

    <p>`

    is that what is causing the ".html" to show up?

    Robert

    #146264
    rkhayat
    Participant

    Thank you traq, that post was very informational.

    I ended up creating a folder for each page on my website with an “index” file in each. (I’m not sure if that’s fundamentally correct but that seemed to be what I got out of the post)

    The url is working fine now..

    New…
    Old

    As for loading times, would that be effected somehow by doing this?

    Again, thank you for helping, it is well appreciated!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.