[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

Apache->virtual host-> redirectPermanent : Browser in Firefox on mac keeps repeating the /domain/simplasearchform.html over and over again

Hi
I have the following code in my httpd.conf for virtualhost because I live to permanently redirec domain.com to domain.com/samplefolder or www.domain.com to domain.com/samplefolder
Here is what I have  
<VirtualHost IP:80>
ServerName domain.com
ServerAlias www.domain.com
ServerAdmin support@domain.com
RedirectPermanent /  http://www.domain.com/domain/simplesearchform.html
</VirtualHost>
When I type in domain.com into the browser, I get domain.com/domain/simplesearchform.html/domain/simplesearchform.html/domain/simplesearchform.htm....
In other words, the /domain/simplesearchform in RedirectPermanent repeats forever in the browser.

How can I make it repeat only once (what do I need to change in the above code) so when I type in domain.com in the browser, i get domain.com/domain/simplesearchform.html instead of the ending part /domain/simplesearchform.html repeating forever.
Thanks,
Ross
0
mshirazi1
Asked:
mshirazi1
1 Solution
 
caterham_wwwCommented:
I think you're looking for RedirectMatch:

RedirectMatch 301 ^/$  http://www.domain.com/domain/simplesearchform.html
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now