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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:43:04+00:00 2026-06-14T21:43:04+00:00

On Magento the URL structure of a module will be like this: example.com/[index.php]/:module/:controller/:action/:param1[/:paramN …]

  • 0

On Magento the URL structure of a module will be like this:

example.com/[index.php]/:module/:controller/:action/:param1[/:paramN ...]

I created a gallery module. The gallery contains several album and the URL for each album is like this (following Magento URL structure):

example.com/[index.php]/gallery/controller/view/name/:album_name

but I want the url of each album on the gallery will be like this:

example.com/[index.php]/gallery/:album_name

How can I achieve this? I’ve tried with .htaccess Rewrite Rule but seems like I got it wrong and it’s not working. Here is my copy of Magento .htaccess rewrite rule

<IfModule mod_rewrite.c>
    ## enable rewrites
    Options +FollowSymLinks
    RewriteEngine on

    ## workaround for HTTP authorization
    ## in CGI environment
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    ## Rewrite Rule for Gallery Module
    RewriteRule ^/gallery/(.*)?$ /gallery/category/view/name/$1 [L]


    ## always send 404 on missing files in these folders
    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

    ## never rewrite for existing files, directories and links
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

    ## rewrite everything else to index.php
    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-06-14T21:43:05+00:00Added an answer on June 14, 2026 at 9:43 pm

    You could accomplish this using magento url rewrite in your confix.xml (without the need to use apache rewrite)

    <global>
         <rewrite>
           <fancy_url>
                 <from><![CDATA[/customModule\/(.*)/]]></from>
                 <to><![CDATA[customModule/controller/view/name/$1/]]></to>
                 <complete>1</complete>
            </fancy_url>
         <rewrite>
    </global>
    

    Read more @ do simple url rewrite in magento using config.xml

    See my answer @ Magento Router Url – Need Hyphnated Path Name on how to access :album_name

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

Sidebar

Related Questions

My module in Magento adminpanel has URL like as http://example.com/index.php/mymodule/ ... and contains custom
I keep getting this Magento error emailed to myself: URL: http://mysite.com/sendfriend/product/send/id/1/ IP Address: 66.249.65.69
i am trying to remove magento controller url in browser address bar. for example
I would like to get a page's URL key in Magento. For example, I
I want to get custom URL from magento helper in this way: <action method=addLink
My frontend url and backend url isn't the same. example, Frontend : http://magento.com/ Backend
I was trying to remove index.php from the URL of a Magento website: _Turn
on my Magento site (not the real url ;) ), I have http://magento.local.com/media/ returning
I am fresher for Magento. Learning the concepts by implementing the below url. http://www.pierrefay.com/magento-developper-guide-howto-tutorial-5
I have magento installed in a subdirectory. www.domain.com/subdir/magento This site worked perfectly at one

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.