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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:39:43+00:00 2026-05-26T07:39:43+00:00

i want that in my blogs that i develop in PHP, the URL should

  • 0

i want that in my blogs that i develop in PHP, the URL should look something like http://mysite.com/jan2006/best-day-of-my-life
instead of something like this http://mysite.com/viewblog.php?id=25
where “best day of my life” is the title of my blog post
what tool do i use to do this automatically ?
and does this technique help search engine optimization ?

  • 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-26T07:39:43+00:00Added an answer on May 26, 2026 at 7:39 am

    You need to use .htaccess and Apache’s mod_rewrite. There is a mass of information out there on google & SO:

    http://www.javascriptkit.com/howto/htaccess.shtml

    http://www.besthostratings.com/articles/htaccess.html

    http://www.bloghash.com/2006/11/beginners-guide-to-htaccess-file-with-examples/

    One thing to note, however, is that given the example you state you will still need a unique identifier to your specific blog post in your URL (namely the ID), e.g:

    something like http://mysite.com/jan2006/best-day-of-my-life instead
    of something like this http://mysite.com/viewblog.php?id=25

    It would actually need to be:

    http://mysite.com/25/jan2006/best-day-of-my-life

    or http://mysite.com/post/25/jan2006/best-day-of-my-life

    If you have an Apache hosting setup, in your root you would need a file named ‘.htaccess’. Its contents would look like (for example):

    # set up mod rewrite
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^post/(.*)/(.*)/(.*)$ viewblog.php?id=$1 [NC,L] # Handle requests for clean urls to blog posts
    

    As for

    does this technique help search engine otimization ?

    Yes, yes it does:

    http://www.seocentro.com/articles/apache/mod_rewrite-seo-purposes.html

    http://techie-buzz.com/how-to/create-seo-friendly-urls-using-mod-rewrite-and-php-part-1.html

    http://www.seomoz.org/ugc/using-mod-rewrite-to-convert-dynamic-urls-to-seo-friendly-urls

    http://webhostinggeeks.com/blog/2011/03/31/seo-friendly-links-with-mod_rewrite/

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

Sidebar

Related Questions

i want to make a asp.net website that has amMap in it (http://flex.ammap.com/download), now
I have a site at blog.foobar.com that I have closed down, and I want
I want that list, because if something horrible happens, and I'll have to reinstall
I want that my unit tests to cover my POCO's. How should I test
I just want that my program or method should run at specific date and
I have 2 blogs [http://######.blogspot.com]. In 1 blog I have some posts labelled as
I've been following this guide for the HandleError attribute: blogs.msdn.com which I use like
I have an ObjectQuery like that: ObjectQuery<Car> query = GetCarQuery(); than i want to
I want to write a blog and some of the blogs that I've seen
I need to develop a script using Wordpress PHP that will run with the

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.