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 7020813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:22:02+00:00 2026-05-27T23:22:02+00:00

i digg on the internet about .htaccess and rewrite rules i need to do

  • 0

i digg on the internet about .htaccess and rewrite rules i need to do with my site.

i saw something i dont understand and want to know what it means

i am wondering what is the difference between the 2 regular expression that i need to use for my site among all others i need to use):

RewriteRule ^home$ mainpage.php?id=$1 [QSA]

and

RewriteRule ^home(/)?$ mainpage.php?id=$1 [L]

i looked at the QSA and L but what the (/) means?

  • 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-05-27T23:22:03+00:00Added an answer on May 27, 2026 at 11:22 pm

    The expression will be (/)? not (/). It means slash or not on the URL. These two URLs will go to the same place:

    http://www.domain.com/home/

    and

    http://www.domain.com/home
    

    So the slash is optional. This way, if a bot or a search engine puts it, the rule will work.

    You can rewrite the rules like this:

    RewriteRule ^home/?$ mainpage.php?id=$1 [L,QSA]
    

    Also, I saw you said:

    among all others i need to use

    If all your pages goes to the same file (in this case mainpage.php), you can create one rule that will automatically rewrites them instead of creating 10 or 15 rules (or more). You can do this like this:

    RewriteEngine on
    REwriteBase /
    RewriteRule ^([a-z0-9\-_]+)/?$ mainpage.php?id=$1 [L,QSA]
    

    This rule will use Letters, Numbers, Dash and Underscores as the page.

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

Sidebar

Related Questions

I'm developing a site with something similar to the Digg bar at the top.
I want to implement something similar to what Digg has done. When the user
im going to digg asp.net deeply.To begin,i want to know which language has more
Let's say you want to create a Digg.com-like site. Should the votes be its
API documentation in Digg is totally confusing...does any one know how to count submissions
I want to replicate how digg.com treats their outbound links. They generate a short
I'm developing a web application similar to Digg and I need an algorithm which
I need to add login modal popup in my project like Digg's login popup.
i want to implement a digg-like vote up/down method in my rails application using
I want to develop a digg-like website and decide to use Rails3. I am

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.