homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum


5+ Year Member

Msg#: 4528869 posted 5:15 am on Dec 17, 2012 (gmt 0)

Hi Please help me to create htaccess file for this

converted to
www.site.com/art if 15 is the ID of art

converted to

if 25 is the ID of animation where art is the parent of animation

and so on till three level

converted to




WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4528869 posted 6:04 am on Dec 17, 2012 (gmt 0)

Uh-oh, time for the boilerplate.

:: shuffling papers ::

Why We Make You Do It Yourself

There are plenty of forums where you can post a "how-to" question and get a fairly immediate answer. The answer may even be correct. But WebmasterWorld is about teaching you how to do it yourself. That way you can roll your own htaccess-- not just for today's problem but for tomorrow's almost identical one.

Here is the analogy:

Your child's room needs cleaning. You know that you can clean it yourself much faster and better than if you have to stand over your child and force him to do it right. But if you do the "make him get it right" part often enough, you will have raised a child who knows how to clean his room-- and who will some day stand glowering over his own children in the same circumstances.

Some day, someone else will post a question in the WebmasterWorld forums and you'll say "Hey, I know the answer to that one!"

Besides, when someone with a very low post count asks a question, that person may have posted the identical question in six different forums. They grab the first answer they get, and never even come back to the others. You can understand that this is infuriating for the person who took the time to compose an answer.

Still with us? Let's have a look at what you have done so far. It sounds like the basic redirect-to-rewrite two-step. In fact I have another and much longer boilerplate about that one, so count your blessings. It's a very popular question, so the Forums should have lots of ideas to help you get started.


WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4528869 posted 8:55 am on Dec 17, 2012 (gmt 0)

Unless we're talking about only a small number of URLs you'll need to rewrite the request to a special PHP script that looks in the database for the name for the ID and then sends a 301 HEADER directive.

You'll also need to modify the PHP script that runs the site to link to the new URLs from the pages of the site. Clicking navigation links within a site should never lead to a redirect.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved