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

  • Home
  • SEARCH
  • 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 7981785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:28:56+00:00 2026-06-04T10:28:56+00:00

I have a problem working with .htacess file and url aliasing and GET method

  • 0

I have a problem working with .htacess file and url aliasing and GET method to retrieve values

.htaccess file

<IfModule mod_rewrite.c>
    # Enable Rewriting 
    RewriteEngine on 
    RewriteRule ^search-location/(\w+)/?$ findjob4.php?loc=$1
</IfModule>

findjob.php file

if (isset($_GET['loc']) or !empty($_GET['loc'])) {
    $d_location = $_GET['loc'];
    echo "Location : " . $d_location;
}

below are the operations what i did,

URL 1   :   www.example.com/search-location/london
ouput   :   Location : london
status  :   Good


URL 2   :   www.example.com/search-location/north-london
output  :   Error 404 , Object not found!
Status  :   The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.


URL 3   :   www.example.com/search-location/north%20london
output  :   Error 404 , Object not found!
Status  :   The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

But i could not get the values of those GET method loc variables, if i give a . . (space) or - (hypen) between url values.
how do i get the values from the url..

thanks

  • 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-04T10:28:57+00:00Added an answer on June 4, 2026 at 10:28 am

    Try replacing the (\w+) with (.*) which matches anything instead of just a word. Or if you want just characters and a dash (-) you can use this: ([A-Za-z-]+)
    Also there’s this tool that helps debugging .htaccess stuff.

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

Sidebar

Related Questions

i have this problem with my url rewrite condition in .htaccess file, everything is
I have an .htaccess file using mod_rewrite to redirect URLs from the old website
I have a working rewrite rule in my .htaccess file, it's supposed to redirect
I have a strange problem working with HTML,CSS in different browsers: Firefox 3.6 and
I'm working with oscommerce and i have problem with Paypal ipn When someone makes
I working on project and have problem with threading and update of UI. I
I have a small problem when im working with a menu and a list
i have a problem on a project I'm working on. I have to create
I have a problem in my coding which was working fine with an older
I have a problem with Ajaxfallbacktable - the pagenation is working fine - the

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.