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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:46:30+00:00 2026-06-01T12:46:30+00:00

I am complete newbie in mod_rewrite , and I have been going through some

  • 0

I am complete newbie in mod_rewrite, and I have been going through some sites reading how to handle this, all I could find was when the get variable was numbers and nothing about strings, and it turns out be over my head.

What I want to do is to rewrite display.php?name=blahblah123 to display/blahblah123

Together with the answer, I would love some sites where I can build some grasp over mod_rewrite myself.

Thanks

Edit:

With more searching, I came up with this

RewriteEngine On
RewriteBase /

RewriteRule ^display/([a-z]+)$ display.php?name=$1 [L]

The code above works, but for some reason, The page I get has no CSS. The CSS I see included shows Hostgator’s 404 page CSS. But HTML looks fine, so does the content and everything else. Any idea?

  • 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-01T12:46:31+00:00Added an answer on June 1, 2026 at 12:46 pm

    Just to be clear, mod_rewrite is something that happens internally in apache. I find that sometimes people do not understand what it does and doesn’t do. It will not take a url that you output and change it from

    display.php?name=blahblah123
    

    to
    display/blahblah123

    It will however, allow someone to make a request from your site for display/blahblah123 and convert that to display.php?name=blahblah123, so that your display.php script can operate on it.

    Rewrite rules require an understanding of regular expressions. The better you understand regex the easier mod_rewrite will be for you.

    As a beginner this article should help: http://www.sitepoint.com/guide-url-rewriting/

    For your specific question, I’d probably use:

    RewriteRule ^display/([a-zA-Z0-9]+)$ /display.php?name=$1 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Complete C# newbie here, so cut me some slack. I have this application that
I'm a complete newbie to all this stuff, and I'm developing a plugin. I
I'm a complete rails newbie, so forgive me if this is trivial. I have
I am complete newbie for programming and this is my first real program I
Complete new person to Ruby and Rails here... Have tried some tutorials in the
I am a complete newbie to SSIS. I have a c#/sql server background. I
I'm a complete newbie when it comes to servers, so I need some help.
I'm a complete newbie in the computer vision world and recently I implemented some
I'm a complete newbie to Objective-C/XCode and it's been a bit daunting so far.
I'm a complete newbie in ruby but I can feel that this code can

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.