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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:12:22+00:00 2026-05-20T03:12:22+00:00

I want to redirect to http referer page using mod rewrite htaccess. For example,

  • 0

I want to redirect to http referer page using mod rewrite htaccess.

For example, a url request is generated from service.html. I want to redirect back to services.html and if a request is generated from portfolio.html redirect back to portfolio.html.

Some one may found it silly, but I am in a problem that the same URL is generated within services and portfolio page that belongs to only them not each other’s pages.

Example of link generated are:

example.com/design.html example.com/market.html

For referer:

example.com/service.html

While same for portfolio:

example.com/design.html example.com/market.html

For referer:

exaple.com/portfolio.html

I think it could be achieved by %{HTTP_REFERER} but I don’t know how.

  • 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-20T03:12:23+00:00Added an answer on May 20, 2026 at 3:12 am

    This is one way I understand your question:

    RewriteCond %{HTTP_REFERER} exaple\.com/(service|portfolio)\.html
    RewriteRule /(design|market)\.html http://exaple.com/%1.html [redirect,last]
    

    The other is this:

    RewriteCond %{HTTP_REFERER} exaple\.com/service\.html
    RewriteRule /design\.html http://exaple.com/service.html [redirect,last]
    RewriteCond %{HTTP_REFERER} exaple\.com/portfolio\.html
    RewriteRule /market\.html http://exaple.com/portfolio.html [redirect,last]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Little question with .htaccess rewrite rule.. I want to redirect http request like that:
I am using ASP.NET 2.0 C#. I want to redirect all request for my
I want to redirect http://myip/admin to https://myip/admin . I am trying to use .htaccess
I want to redirect http://www.suma.ir/product.php?id_product=12 to http://www.suma.ir/product.php?id_product=508 but I'm having trouble. The URL path
I want to redirect from an action in one controller to an action in
i want to redirect http://abc.com/a to /mypage.php?par1=a and http://abc.com/a/b to /mypage.php?par1=a&par2=b how can it
I want to redirect all of my old domain request to my new domain
I am trying to redirect users to the last page they logged in from
I want to block access to only one directory say http://www.example.com/pictures Every file in
I have a method that where I want to redirect the user back to

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.