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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:10:18+00:00 2026-06-15T13:10:18+00:00

Just curious if anyone can help me on this HTACCESS issue. I have these

  • 0

Just curious if anyone can help me on this HTACCESS issue.

I have these OLD URLS that need to get forwarded properly.

Previous structure

domain.com/Canada/Accounting

domain.com/Canada/Trades

domain.com/Canada/Sales

Proper structure

CATEGORY – /jobs/accounting-jobs

LOCATION – /jobs/jobs-kelowna

TOGETHER – /jobs/accounting-jobs-kelowna

Domain Structure

domain.com/jobs/[category]-jobs-[location]

Is this possible, either by HTACCES or PHP…just don’t want these 404’ed pages.
I have 86+ to do, if there is a good way to forward these.
This is what I have, but i’m unable to successfully forward the bad-urls properly.

OLD

/browse
/Toronto/
/Canada/Administrative
/Vancouver/
/Canada/Trades
/Calgary/
/Canada/Hospitality

This is my HTACCESS right now.

Options +FollowSymlinks

    RewriteEngine on
    RewriteBase /

    #
    # Trailing slash check
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
    RewriteRule ^(.*)$ $1/ [L,R=301]


    #
    # PAGES
    RewriteRule ^add-job/?$     /add-job.php [L]
    RewriteRule ^jobs/?$        /results.php [L]
    RewriteRule ^sitemap/?$     /sitemap.php [L]

    #
    # SEARCH
    # CATEGORY - accounting-jobs
    # LOCATION -            jobs-kelowna
    # TOGETHER - accounting-jobs-kelowna
    RewriteRule ^jobs/([a-zA-Z0-9_-]+)/([0-9]+)?$    results.php?whatwhere=$1&page=$2
    RewriteRule ^jobs/([a-zA-Z0-9_-]+)/([0-9]+)/?$   results.php?whatwhere=$1&page=$2
  • 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-15T13:10:19+00:00Added an answer on June 15, 2026 at 1:10 pm

    To 301 redirect your pages you can do something like:

    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^(\w+)/(\w+)$ /jobs/$2-jobs-$1 [R=301,L]
    

    This only addresses the urls from your previous structure (the combinations, you have not shown any previous urls with just location or category) but note that Canada will stay Canada, it does not become canada. You can change everything to lower case using rewrite as well.

    You also have to take care that you don’t rewrite any of the current urls but without more information, this should do it.

    Edit: For the location-only urls you could use a rule like:

    RewriteRule ^(\w+)/$ /jobs/jobs-$1 [R=301,L]
    

    Again, you need to look out that your rewrite rule does not interfere with your current urls. If that is the case, you would need to redirect every old url manually.

    For lower-case new urls, you should search SO, there are some questions with good answers about converting a mized-case variable to lower-case.

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

Sidebar

Related Questions

I'm just curious if anyone has any great ideas on this. We have a
So I'm just learning Forth and was curious if anyone could help me understand
Just curious what is the best practice for solving the following issue. I have
wondering if anyone can help. This works, but I was wondering how it would
Just curious, if django has already proven that auto-admin can be done well, why
Just curious if anyone can explain to me why I can request a page
I'm just curious to know if anyone has used (successfully) Fusion Charts with Open
Just curious, is there a format string I can use to output something like
Just curious if it is syntactically possible to do something like this: static (void)
Just curious how you would comment this line of code: string customerNm = customerNm.EndsWith(s)

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.