saviorho Posted November 16, 2011 Share Posted November 16, 2011 sever: ubuntu11.x Apache2.x How do i change "http://xxx.xxx.xxx.xxx/myshop" forever like "http://www.myshop.com" vitural host already setup .htaccess? Sorry poor english Link to comment Share on other sites More sharing options...
Dave L Posted November 16, 2011 Share Posted November 16, 2011 This have been covered many times on the forum. The 'Search' feature is your best friend Link to comment Share on other sites More sharing options...
saviorho Posted November 16, 2011 Author Share Posted November 16, 2011 This have been covered many times on the forum. The 'Search' feature is your best friend I already search but i don't want move content i just want show the diffrent domain name Link to comment Share on other sites More sharing options...
Carl Favre Posted November 16, 2011 Share Posted November 16, 2011 Hi saviorho, You can also write the following code in your htaccess file (you need to replace domain.com with your domain name) : RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] Link to comment Share on other sites More sharing options...
saviorho Posted November 17, 2011 Author Share Posted November 17, 2011 Hi saviorho, You can also write the following code in your htaccess file (you need to replace domain.com with your domain name) : RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] thanks i try now goto the page like this: 310 (net::ERR_TOO_MANY_REDIRECTS i sent my .htaccess form for you please help me check Link to comment Share on other sites More sharing options...
Carl Favre Posted November 17, 2011 Share Posted November 17, 2011 Hi saviorho, Post it there so other members can also help you. I must warn you, I am absolutely not an htaccess expert but will try to help you . Link to comment Share on other sites More sharing options...
saviorho Posted November 17, 2011 Author Share Posted November 17, 2011 Ok... now is a long story... my sever: ubuntu11.x Apache2.x server adress: 222.111.333.444 (ex) prestashop install in : /etc/www/myshop (ex) so now my domain: 222.111.333.444/myshop (ex) than i buy a new domain: www.myshop.cc (ex) now i want change the domain name 222.111.333.444/myshop to www.myshop.cc hope anytime anypage look like www.myshop.cc/omgsell-1 or www.myshop.cc/reg anyway my vituralhost setup <VirtualHost *:80> ServerName www.myshop.cc DocumentRoot "/etc/www/myshop" </VirtualHost> and i write .htaccess like: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^222.111.333.444/myshop$ [NC] RewriteRule ^(.*)$ http://www.myshop.cc/$1 [L,R=301] and i also try this: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www.myshop.cc$ [NC] RewriteRule ^(.*)$ http://www.myshop.cc/$1 [L,R=301] alway show me 404 or 310 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now