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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:53:32+00:00 2026-05-23T07:53:32+00:00

I am pretty new to using the RewriteRule, so I am likely missing something

  • 0

I am pretty new to using the RewriteRule, so I am likely missing something obvious, but I have a PHP script that takes URL variables like this:

{baseurl}properties.php?prop=Property-Name

I would like to create RewriteRules so that anyone who types in this script name/variable combo would have their URL rewritten to:

{baseurl}/properties/Property-Name

As well as ensuring that anyone who types in the flat-link url, actually calls the script with the right variable name and value.

I have been referring to this link and I have found related threads:

Mod_rewrite flat links

Mod_rewrite trouble: Want to direct from ?= to a flat link, nothing seems to work

But, I am obviously doing something wrong, as I cannot get this URL to work the way I want. I am currently using the following code, which appears to do nothing (aside from rewriting the URL to include the www, and redirect requests for index.php to the site root):

RewriteEngine ON
RewriteCond %{HTTP_HOST} ^baseurl.com$ [NC]
RewriteRule ^(.*)$ http://www.baseurl.com/$1 [R=301,L]
RewriteRule ^index.php / [R=301,L]
RewriteRule ^properties/([0-9A-Za-z]+)/$ /properties.php?prop=$1

The issue is clearly with the last RewriteRule, assuming nothing above is affecting it. Again, I am likely doing something ridiculous. Can someone please explain what I am doing wrong?

Thanks for your help.

  • 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-23T07:53:32+00:00Added an answer on May 23, 2026 at 7:53 am

    At a quick glance, it appears that you forgot to include the dash in your regular expression and you included trailing slash. Use this instead:

    RewriteRule ^properties/([0-9A-Za-z-]+)$ /properties.php?prop=$1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey folks, I'm pretty new to flash, so maybe I'm missing something. I'm using
I am pretty much new to using SQL Server 2000. I have been using
I am new to Java world but I am pretty good at using Flex,
I'm pretty new to MVC 2 using the Entity Framework. I have two tables
I am pretty new to using object/classes in PHP and I am curious about
I'm pretty new to XSLT, but need to use it for a CMS using
I am pretty new to using LINQ and have been trying it out querying
I am pretty new to c#. I have a page that requires multiple recordsets,
I'm pretty new to using Linux commands. So suppose I have a file with
So i'm pretty new to using the Bing Maps control in Silverlight, but 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.