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

  • SEARCH
  • Home
  • 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 9114749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:16:12+00:00 2026-06-17T04:16:12+00:00

Maybe it will seem a very simple question, my website’s url are awfully written,

  • 0

Maybe it will seem a very simple question, my website’s url are awfully written, so I want to rewrite them. So I am preparing to activate mod_rewrite. The question is the following:

Suppose my url switches from site_url/index.php?page=mypage&type=mytype to site_url/mypage/mytype, what will happen if one refresh the page, is it necessary to put in the .htaccess file the converse process for proceeding to rewriting ?

  • 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-17T04:16:13+00:00Added an answer on June 17, 2026 at 4:16 am

    You need a combination of redirect and rewriting. A draft outline of URL rewriting process would be:

    • If URL contains .php, 301/302 redirect the request to its SEO friendly version. This will change the address in browser address bar.
    • If SEO friendly URL was requested, rewrite it to its PHP version. This will not change the address in browser address bar.

    Here is a very basic example of rewrite rules that do both of the above:

    #
    # redirect /index.php?page=somepage&type=sometype to friendly url
    # 
    RewriteCond %{THE_REQUEST} /index\.php
    RewriteCond %{QUERY_STRING} page=(\w+)&type=(\w+)
    RewriteRule ^index\.php$ /%1/%2? [R,L]
    
    #
    # rewrite /somepage/sometype to index.php
    # 
    RewriteRule ^(\w+)/(\w+)$ index.php?page=$1&type=$2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm newer in JavaScript.So maybe my question will seem naive. My JavaScript Code: <script
I'm newer in T-SQL.So maybe my question will seem naive. I need to retrieve
My question is maybe a bit unclear so i will give an example <table
I think this is a very simple question, but I’m new to programming so
This is probably a very simple question to answer. i am new to Rails
using stdout library it will maybe pass data to logcat or somewhere else which
Delphi XE2 starter for me, but maybe a general answer will help others ...
I've been trying this for hours, so maybe a fresh set of eyes will
Maybe my title is not the best but here is what I really want.I
I am absolutely new to MediaWiki so I am afraid my question may seem

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.