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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:11:19+00:00 2026-05-31T16:11:19+00:00

I am trying to make clean url with htaccess I have a profile.php page

  • 0

I am trying to make clean url with htaccess
I have a profile.php page and I get user domain name to display his page
now if the user for example hit http://www.XXXX.com/domain I will display his main page

it is equivalent to http://www.XXXX.com/profile.php?id=domain without htaccess file
I used this code and its working very fine

Options +FollowSymLinks
RewriteEngine On
RewriteCond %(SCRIPT_FILENAME) !-d
RewriteCond %(SCRIPT_FILENAME) !-f
RewriteRule ^(\w+)$ ./profile.php?id=$1
RewriteRule ^(\w+)/$ ./profile.php?id=$1

now I am trying to get page id and the view that the user wants to display but it didn’t work

note page id and view are optional values , if didn’t found in the url I will display the main page

I want the url to look like http://www.XXXX.com/domain/pageid/view ,
which is equivalent to http://www.XXXX.com/profile.php?id=domain&pid=pageid&v=view

  • 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-31T16:11:20+00:00Added an answer on May 31, 2026 at 4:11 pm

    This should do it:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %(SCRIPT_FILENAME) !-d
    RewriteCond %(SCRIPT_FILENAME) !-f
    RewriteRule ^(\w+)\/(\w+)\/(\w+)\/?$ ./profile.php?id=$1&pid=$2&v=$3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a clean url for a blog on a dynamic website,
I'm trying to make a sort of PHP bot. The idea is to have
trying to make a page which will recursively call a function until a limit
Trying to make a floating css menu. How do I get the floating div
Trying to make simple minesweeper game in python, but have one problem. I have
I'm trying to get two types of URL behaviors to work, but I get
I have a puzzling problem with trying to make an ajax/static state program. What
I'm trying to clean up my URLs using mod_rewrite in my .htaccess files. Let's
I'm trying to use TimThumb to display image on my blog <?php the_title(); ?>'><img
I am trying to clean up my routes and I have a situation I

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.