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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:21:10+00:00 2026-06-03T08:21:10+00:00

Currently I have this code in .htaccess file to create a fake directory e.g.

  • 0

Currently I have this code in .htaccess file to create a fake directory

e.g.

http://www.mysite.com/something.php

will then become

http://www.mysite.com/something

I am using the following code for that

Options +FollowSymLinks 
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d 
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^(\w+)$ ./$1.php

but what I want to do now is allow users to have a url like

http://www.mysite.com/myusername

that url will then point to this page

http://www.mysite.com/profile.php?username=myusername

I just wanted to know if this was possible?

  • 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-03T08:21:12+00:00Added an answer on June 3, 2026 at 8:21 am

    use this,

    Options +FollowSymLinks 
    RewriteEngine On
    
    RewriteCond %{SCRIPT_FILENAME}.php -f
    RewriteRule ^(\w+)$ $1.php [L,NC]
    
    RewriteCond %{SCRIPT_FILENAME} !-d 
    RewriteCond %{SCRIPT_FILENAME} !-f
    
    RewriteRule ^([a-zA-Z0-9_.-]+)/?$ profile.php?username=$1 [L,NC,QSA]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have this piece of code: NSString *strURL = [NSString stringWithFormat:@http://www.sample.com /phpFile.php?firstname=%@,txtfirstName.text]; NSString
I have a text file , filled with pipe separated URLs, like this: http://www.example.com|http://www.example2.com|http://www.example3.com|....
Currently I have this code var App = Ember.Application.create(); App.user = Ember.Object.create({ people: customers
My htaccess have this code # # Apache/PHP settings: # Options -Indexes Options +FollowSymLinks
I currently have this code that parses imdbAPI http returns: text = 'unicode: {Title:The
I have a relatively complex .htaccess file to control page requests, this currently redirects
Here is the code I have currently in my .htaccess file: Options +FollowSymLinks RewriteEngine
I currently have this code which reads the first field in a database record
Ok I currently have this code public int i = 0; //this is outside
Hello I currently have this code checking if a cookie exists, it works all

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.