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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:49:48+00:00 2026-05-26T10:49:48+00:00

im kind a new in this mod rewrite thing. im trying to do some

  • 0

im kind a new in this mod rewrite thing.

im trying to do some basic redirect.

Options +FollowSymLinks
RewriteEngine on
ErrorDocument 404 /index.php
RewriteCond %{HTTP_HOST} ^pickndrive.info
RewriteRule (.*) http://www.pickndrive.info/$1 [R=301,L]
RewriteRule ^new/cars/([^/]+)/([^/]+)/? profiles.php?carname=$2&carnumb=$1 [L]
RewriteRule ^used/cars/([^/]+)/([^/]+)/? used.php?carname=$2&carnumb=$1 [L]
RewriteRule ^compare/([^/]+)/([^/]+)/([^/]+)/? compare.php?car[]=$1&car[]=$2&car[]=$3 [L]
RewriteRule ^compare/([^/]+)/([^/]+)/? compare.php?car[]=$1&car[]=$2 [L]
RewriteRule ^compare/([^/]+)/? compare.php?car[]=$1 [L]

thats my .htaccess but its in a very bad condition !

what im trying to do is.

1) Trying to tell google that pickndrive.info and http://www.pickndrive.info are the same.

2) redirect /new(or used)/cars/(INT value)/(string) to X.php?carname=(string)&carnumb=(INT)

3) redirecting /cars/(STRING) into a search page search.php?query=$1

4) redirecting /cars to browse.php?#tabs-all

5) redirecting compare/*/ (any amount up to 3 times) to compare.php?car[]=X1&car[]=X2&car=X3

well as far is this its working. but i cannt get goal number 3/4 to work cause if i do they just screw the rest :(.

can some one point me out how to write a nice clean .htaccess mod-rewrite please 🙂

  • 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-26T10:49:49+00:00Added an answer on May 26, 2026 at 10:49 am

    Something like this for #3/4?

    RewriteRule ^cars/([^/]+)/? search.php?query=$1 [L]
    RewriteRule ^cars/? browse.php [L]
    

    You should be able to add that at the end. Note that the #tabs-all isn’t going to translate as a rewrite, since it’s something the browser handles on the client side and nothing the server can do. You could maybe add some javascript to automatically get the browser to go to #tabs-all with some javascript in browse.php.

    I don’t know if there’s a cleaner way to do #5 besides the 3 “compare” rules, and #1 and #2 are fine. If you rename (or symlink) “search.php” to “new.php”, you could combine those 2 rules to:

    RewriteRule ^([^/]+)/cars/([^/]+)/([^/]+)/? $1.php?carname=$3&carnumb=$2 [L]
    

    but I think it’s better to distinctly rule out /new/cars/ and /used/cars/, since that rule would also rewrite “/qwerty/cars/” to “qwerty.php?…”

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

Sidebar

Related Questions

I'm kind of new to this whole thing so I need some help. I
I'm kind of new to WPF, and I'm trying to do some specialized data
I'm using this kind of code for my TCP/IP connection: sock = new Socket(host,
I'm kind of new to XSLT, and I've gotten basic transformation done. Next I
I am kind of new to C (I have prior Java, C#, and some
i'm new to this kind of things. Kinda the first post ever regarding programming,
I'm kind of new to this so please bear with me... Let's say I
I'm kind of new to this site and programming in general, so please excuse
Kind of new to C# and trying to broaden my abilities a bit. I
I'm trying to implement a new ReWrite rule on my local dev machine. 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.