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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:29:38+00:00 2026-05-18T09:29:38+00:00

regulars question :P Current URL http://domain.com/index.php http://domain.com/index.php?page=submit-hosting http://domain.com/index.php?page=popular-hosting How write my .htaccess to make

  • 0

regulars question 😛

Current URL

http://domain.com/index.php
http://domain.com/index.php?page=submit-hosting
http://domain.com/index.php?page=popular-hosting

How write my .htaccess to make current URL to be like this

  1. When user type http://domain.com/index.php url will return to http://domain.com/ only without index.php

  2. And page with$_GET['page'] to be http://domain.com/submit-hosting/

Let me know 🙂

  • 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-18T09:29:39+00:00Added an answer on May 18, 2026 at 9:29 am

    From Google I got

    to remove index.php or index.html

    RewriteCond %{THE_REQUEST} \ /(.+/)?index\.(html?|php)(\?.*)?\  [NC]
    RewriteRule ^(.+/)?index\.(html?|php)$ ./$1 [R=301,L]
    

    to make end with slash

    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
    
    RewriteCond %{REQUEST_URI} ^(/.*[^/])/?$
    RewriteCond %{DOCUMENT_ROOT}%1.php -f
    RewriteRule ^([^/]+)/?$ ./$1.php [QSA,L]
    

    to make /page-name/

    RewriteRule ^([^/]*)/$ ./index.php?page=$1  [QSA,L]
    

    Any simple or better from this one?

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

Sidebar

Related Questions

The Question is, In a regular HTTP Request to a server (non-ajax), Is the
The question says it all. The specialty in my case is that the current
A question related to Regular cast vs. static_cast vs. dynamic_cast : What cast syntax
I don't usually use regular expressions, hence my question. I need a regex to
Currently, my cURL multi exec stops if one url it connects to doesn't work,
On Windows 7, I have a command-line program that fails due to file write permission
I have a Greasemonkey script which operates on a search results page at a
I have trouble getting a flash message to show after a failed form submit.
I'm newbie in Python, but this question is not a homework (actually this code
First question on here so please be nice :) I know very little about

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.