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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:06:43+00:00 2026-05-23T17:06:43+00:00

I am using WordPress’s permalink structure %category%/%postname%/ with the following htaccess: <IfModule mod_rewrite.c> RewriteEngine

  • 0

I am using WordPress’s permalink structure %category%/%postname%/ with the following htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

The url’s take the form http://www.example.com/category/postname/. I have a plugin where if you append ?m=gallery to the URL it will bring you to the posts’ gallery. So http://www.example.com/category/postname/?m=gallery brings you to the gallery. I would like to be able to use http://www.example.com/category/postname/gallery/ instead. What do I need to modify in my htaccss to achieve my desired results? I would imagine it would be something like this RewriteRule ^(.+)/gallery$ $1?m=gallery

Edit – Current htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^(.+)/gallery/$ $1/?m=gallery [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
  • 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-23T17:06:43+00:00Added an answer on May 23, 2026 at 5:06 pm

    Considering URL example you have provided (http://www.example.com/category/postname/gallery/ => http://www.example.com/category/postname/?m=gallery) you will need this sort of line:

    RewriteRule ^(.+)/gallery/$ $1/?m=gallery [QSA]
    
    1. Added missing slashes /

    2. Added [QSA] flag (may not be really necessary actually).

    You would need to put this rule somewhere on the top: after this line, for example: RewriteRule ^index\.php$ - [L]

    Obviously, you ensure that WordPress will generate this kind of URLs: http://www.example.com/category/postname/gallery/

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

Sidebar

Related Questions

I am using wordpress and use custom permalink structure: /%category%/%postname%/ My problem is that
Im using wordpress and using the following to get the last 3 most recent
i'm using wordpress, i have a page that i can access like this http://mywebsite/category/page
I'm using WordPress plugin Category Page to display the most recent 5 posts from
I am using wordpress and on the page sidebar.php I have the following code:
I'm using WordPress and I'm following W3's guide for uploading a file: HTML code:
Using wordpress, I am pulling in a custom fields from specific posts to fill
Im using Wordpress, Im also creating posts via XMLRPC based on an RSS feed
I run my blog using Wordpress and all too recently became a big believer
I created a site using wordpress. I installed the 'starkers' theme and modified it.

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.