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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:50:08+00:00 2026-06-07T14:50:08+00:00

Could you tell me why this rewrite do not pass 2nd value? tt value

  • 0

Could you tell me why this rewrite do not pass 2nd value? tt value is passed in to %1 but name is not in to %2

RewriteBase /
RewriteRule ^wedding-hair-and-make-up-images-([^/]*)-(.*)\.php$ franchisee-gallery.php?franchise_name=$1&id_tt=$2 [L]
RewriteCond %{THE_REQUEST} ^(GET|POST|HEAD|TRACE)\ /franchisee-gallery.php
RewriteCond %{QUERY_STRING} name=([^\&]*) 
RewriteCond %{QUERY_STRING} tt=(.*) 
RewriteRule ^franchisee-gallery.php$ wedding-hair-and-make-up-images-%1-%2.php? [R,L]  
  • 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-07T14:50:10+00:00Added an answer on June 7, 2026 at 2:50 pm

    The %N refeers to the matching groups of last condition, so %1 is the match of condition:
    RewriteCond %{QUERY_STRING} tt=(.*)

    http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#RewriteCond

    RewriteCond backreferences: These are backreferences of the form %N (1 <= N <= 9), which provide access to the grouped parts (again, in parentheses) of the pattern, from the last matched RewriteCond in the current set of conditions.

    For your case, you could rewrite the access of “franchisee-gallery.php” to another PHP, that makes the redirection ( via HTTP Header Location ). I can’t figure it out how to make this via Rewrite. Maybe with PERL External Rewriting Program, using RewriteMap.


    Solution founded! Using custom environment variables, it’s possible to store the matched values in temporary variables!

    RewriteEngine on
    RewriteBase /
    RewriteRule ^wedding-hair-and-make-up-images-([^/]*)-(.*)\.php$ franchisee-gallery.php?franchise_name=$1&id_tt=$2 [L]
    
    RewriteCond %{REQUEST_URI} ^/franchisee-gallery.php
    RewriteCond %{QUERY_STRING} name=([^&]*)
    RewriteRule .* - [E=name:%1]
    
    RewriteCond %{REQUEST_URI} ^/franchisee-gallery.php
    RewriteCond %{QUERY_STRING} tt=([^&]*)
    RewriteRule .* - [E=tt:%1]
    
    RewriteCond %{THE_REQUEST} ^(GET|POST|HEAD|TRACE)\ /franchisee-gallery.php
    RewriteRule ^franchisee-gallery.php$ wedding-hair-and-make-up-images-%{ENV:name}-%{ENV:tt}.php? [R,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone tell me why this code does not update the data response? It's
Could someone tell me if this: $.ajax({ url: 'test.html', success: function(data) { alert(Data Loaded:
could someone tell me if this is the right way to do bidirectional mapping?
Could someone please tell me why this <%= destroy_password_url @user.password_reset_token %> generates http://localhost:3000/api/destroy_password.4G5EoRVYMUAtiIKqOerKsw routes.rb
I was wondering if anyone could tell me if this kind of behaviour is
I know questions like this have been asked numerous times, but not quite this
If anyone could tell me how this website is achieving the disappearing of the
I with could re-write the question better, but can someone tell me where I
Could anyone tell me why this doesn't work? enum CompCriteria{ByKey,ByValue,ByeKeyAndValue}; template<class T> struct X;
Could someone tell me how this could be done? http://l.yimg.com/p/social_buttons/facebook-share-iframe.php?u=http://www.lifehacker.com This is basically a

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.