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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:13:09+00:00 2026-05-11T06:13:09+00:00

What do I need to do to the following rewrite rule to make it

  • 0

What do I need to do to the following rewrite rule to make it so it works whether or not their is a slash at the end of the URL?

ie. http://mydomain.com/content/featured or http://mydomain.com/content/featured/

RewriteRule ^content/featured/ /content/today.html  
  • 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. 2026-05-11T06:13:10+00:00Added an answer on May 11, 2026 at 6:13 am

    Use the $ to mark the end of the string and the ? to mark the preceding expression to be repeated zero or one times:

    RewriteRule ^content/featured/?$ content/today.html 

    But I recommend you to stick to one notation and correct misspelled:

    # remove trailing slashes RewriteRule (.*)/$ $1 [L,R=301]  # add trailing slashes RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .*[^/]$ $0/ [L,R=301] 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to rewrite the following URL: http://example.com/folder/subfolder/filename to http://example.com/folder/subfolder/filename.txt I've tried the following:
I need a little help figuring out what the following URL rewrite rule means.
I need to do a url rewrite maintaining following condition: rewrite http://domain.net (or http://www.domain.net
I have the following .htaccess rule: RewriteEngine on RewriteRule ^(.*) http://www.server2.com/index.php?action=$1 I need to
I have the following rewrite rule that I need to alter in order to
I need to rewrite an image path on the following URLs: domain.com/system/index domain.com/system/view/12345 domain.com/system/search/term1:/term2:data/term3:/term4:data/term5
I need the following xml to be made in code: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:gravity=right
I'm lousy at regex and need a .htaccess rewrite rule for a following link
I need to rewrite a rule using htaccess, I currently have the following: RewriteRule
Given a URL rewrite rule like the following: <rule name=RewriteUserFriendlyThings stopProcessing=true> <match url=^cat/sub-cat/(\d+)/([^/]+)/?$ />

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.