简体   繁体   中英

htaccess redirect url without changing address bar

Im using bigcartel and i would like to redirect my url to bigcartels url without changing the broswers address bar, ie www.example.com to be redirect to www.test.bigcartel.com but show www.example.com in the browsers address bar

I dont want to use iframes but htaccess file.

RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/?$ "http\:\/\/testing\.bigcartel\.com\/" [L]

can anybody help? i found this below but didn't know what to change to make it work

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.+)$ ?url=$1 [L]

You should enable mod_proxy. Then allow access with:

<proxy http://www.test.bigcartel.com>
       Allow from all
</proxy>

And setup the redirection:

ProxyPass / http://www.test.bigcartel.com

For more options see the docs for mod_proxy .

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