Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8669199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:24:55+00:00 2026-06-12T18:24:55+00:00

I have no experience with .htaccess, but I got a tip that it’s very

  • 0

I have no experience with .htaccess, but I got a tip that it’s very useful so I wanted to try this.

I now have a file called .htaccess, in my root folder.
The files contains this;

RewriteBase /

RewriteEngine on
RewriteCond %{HTTP_HOST} ^kellyvuijst\.nl [nc]
RewriteRule (.*) http://www.kellyvuijst.nl/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^([^/]+)/$ $1.html 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

What I’m trying to do here is create a ‘www.mysite.com/portfolio/’ instead of ‘mysite.com/portfolio.html’ I used some tutorials on this and I think it’s correct, but I’m not sure.

So now I have this file, and what now? The tutorials all show what to put in the file but not what to do with it? Do I need to call for it in every .html page I have? And how do I call for it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:24:56+00:00Added an answer on June 12, 2026 at 6:24 pm

    Hmm, you’re using a lot of rules here to achieve just that.

    Anyway, no you don’t have to include that file. If you’re hosting your site on a server with Apache it’ll be included automatically. Can you also run PHP files or is your site just HTML? That’s always an easy sign if you’re also using Apache (not 100%, but often the go together).

    If so, you could try just using these rules first:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.(.+)\.(.+)$ [nc]
    RewriteRule ^(.*)$ http://www.%1.%2/$1 [R=301,L]
    

    If that always adds www to your address, even if you type in the URL without www at least you can be certain that it works.

    Then, to make the .html disappear you can add this rule:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule $(.*)/$ /$1.html [L]
    

    This should make every url that ends with a slash (like portfolio/) use a .html file instead (portfolio.html), but only if /portfolio/ isn’t an actual directory on your website.

    (I removed your url from the rules because this way it should also work if you use it on another website, or if you change your url. It should still do what you want)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't have much experience with htaccess. But I have this script: Options +FollowSymLinks
I have experience developing in android and using REST services, but now I'd like
Anyone have experience with this plugin? I have it installed but I have no
anyone have experience doing this? when i say imaginary i mean the square root
Anyone have experience playing audio (right now specifically mp3s) with python using a any
I don't have any experience building software for Windows but I have experience with
I only have experience with log4net however that does not mean that there are
Im have absolutely no experience with .htaccess and i tried something today. I basicly
I have experience with C++ but I've never really used Qt before. I'm trying
Anyone have experience with tools that can capture web traffic and create scriptable objects

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.