简体   繁体   中英

Subdomain redirection and URL not chaging

I'm using godaddy to redirect with masking from http://myshop-123.com (a shopify webstore) to http://eu.myshop.com .

I want the URL bar to change when the user navigates in the page. For example, when user navigates to the page product_1.html, I want the browser's URL bar to show http://eu.myshop.com/product_1.html , which currently is not happening since the URL bar shows only http://eu.myshop.com/ no matter what.

As far I've seen in the source of the http://eu.myshop.com when loaded, the page is being loaded in a frame:

<html>
 <head>...</head>
 <frameset rows="100%,*" border="0">
 <frame src="http://myshop-123.com" frameborder="0">
  #document
 </frame>
 <frame ..>
 </frame>
</html>

How can I make the subdomain show the changes in the URL bar when the user navigates the page?

I have even tried to manipulate the browser history with the HTML5 pushState , but still no results and I guess because of the godaddy's redirection and frame.

(note: the links are fictitious).

You can do it with .htaccess file :

RewriteEngine on
RewriteCond %{HTTP_HOST} ^myshop-123.com$
RewriteRule ^(.*)$ http://eu.myshop.com/$1 [QSA,L]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM