how to rewrite a url

Posted on 2012-09-01
Last Modified: 2012-09-04
I have an image gallery at

and I want it to be found at this url with this url showing in the address bar

Can I do this in the htaccess file?
Question by:tf2012
    LVL 74

    Assisted Solution

    by:käµfm³d 👽
    The htaccess file cannot affect what you see in the address bar (unless you use something like Helicon SEO library). You would therefore put "" in your HTML and within your htaccess file you would have a rule that would translate the incoming "" into "". I believe something like this would do it:

    RewriteEngine On
    RewriteRule ^gallery$ /gallery/index.php?/category/stuff [L]

    Open in new window

    LVL 18

    Accepted Solution

    LVL 1

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    This video teaches users how to migrate an existing Wordpress website to a new domain.
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now