What is needed to have redirected URL appear in br

2019-09-15 00:03发布

My htaccess is configured correctly to redirect visitors from apples.com to oranges.com, but what do I need to add so that instead of oranges.com appearing in the browser address bar, the user sees apples.com?

Update: As an alternative how can I have htaccess create a variable (such as apples) that can be picked up by javascript?

rewriteengine on
rewritecond %{HTTP_HOST} ^www.apples.com$ [OR]
rewritecond %{HTTP_HOST} ^apples.com$
rewriterule ^domainchange\/$ "http\:\/\/oranges\.com\/" [R=301,L] #numbers
rewritecond %{HTTPS} off
rewritecond %{HTTP_HOST} ^www.oranges.com$ [OR]
rewritecond %{HTTP_HOST} ^oranges.com$
rewriterule ^$ "https\:\/\/oranges\.com\/" [R=301,L] #numbers


Options -Indexes

0条回答
登录 后发表回答