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

  • Home
  • SEARCH
  • 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 7898121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:20:54+00:00 2026-06-03T08:20:54+00:00

I’m trying to make my website display the other pages as a www.example.com/pageone/ link

  • 0

I’m trying to make my website display the other pages as a http://www.example.com/pageone/ link instead of http://www.example.com/pageone.html.

Problem is, i’m reading up on ways to do that using .htaccess and its getting me confused because i don’t understand the commands.

I understand that the first step, however, is to write this in the .htaccess file:

RewriteEngine On

After this step, i have absolutely no idea whats !-d nor {REQUEST_FILENAME} nor ^(.*) and all that programming text. Is there a documentation that i can refer to?

Or can anyone provide me a simple explanation on how to configure the .htaccess file to understand that if i want to go to

www.example.com/pageone.html

, all i need to type into the URL is

www.example.com/pageone/

and PHP files, etc as well?

  • 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-03T08:20:55+00:00Added an answer on June 3, 2026 at 8:20 am

    First of all, there’s the Official Documentation. To solve your specific problem, I would go about this way:

    RewriteEngine on #Turn on rewrite
    
    RewriteCond %{REQUEST_FILENAME} !-f #If requested is not a filename...
    RewriteCond %{REQUEST_FILENAME} !-d #And not a directory
    RewriteRule ^([^/]+)/?$ /$1.html [L] #Preform this redirect
    

    The RewriteConds only apply to the next following rule. If you were to have multiple rules, you’d need to write the conditions for each one.

    Now, the Apache server matches the requested path (everything after http://www.example.com/), to see if it matches any of the rules you’ve specified. In which case, there is only one:

    ^([^/]+)$
    

    This regular expression matches any number of characters, which are not slash /, followed by an optional trailing slash. If the match was found, it will rewrite the request to the second parameter: /$1.html, $1 means “Whatever was matched between the brackets”, which in our case is all of the non-slash characters.

    The [L] flag, tells the rewriting engine to stop looking for rules if this rule was matched.

    So to conclude, www.example.com/whatever/ will be rewritten sliently at the server to www.example.com/whatever.html

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
i got an object with contents of html markup in it, for example: string
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.