I have just set up my first domain in plesk (v10 I think? Newest version). I am used to using shared hosting where the www is set up, but upon setting up my domain only http://retapy.com will work, and http://www.retapy.com wont work. I have had a look on here and on other forums and have since changed the domain name in the control panel to "www.retapy.com", but now it doesnt work without the "www." prefix.
I am also wondering, if the domain is set to "www.retapy.com" in the control panel, will I be able to set up other sub domains after?
I would like to use .htaccess:
RewriteCond %{HTTP_HOST} ^retapy.com
RewriteRule (.*) http://www.retapy.com/$1 [R=301,L]
But cant do this as it isnt recognising http://retapy.com at all.
What is the best way to set this up?
I read about having the domain set up as just retapy.com (no prefix) and have a "www" folder in the httpdocs folders which is simply a shortcut to the main folder, but I am now completely lost.
Looks like your domain hasn't www DNS record.
Check DNS zone in your domain registrar web site and add "www" cname or a record for domain.
I've checked one DNS server of you domain:
[~]# nslookup www.retapy.com NS0.VPS380574-1.LCNSERVERS.COM
Server: NS0.VPS380574-1.LCNSERVERS.COM
Address: 178.18.126.170#53
** server can't find www.retapy.com.qa.plesk.ru: REFUSED
Related
I have multiple domains directing to multiple directories on my system, as an example...
shopwebsite.co.uk > public_html/useraccounts/shopsite
carwebsite.co.uk > public_html/useraccounts/carsite
foodwebsite.co.uk > public_html/useraccounts/foodsite
This has been okay for a while until I realized that framed forwarding caused the mobile responsiveness to stop responding and so I changed all of the domains to simple redirects. This does work although as you can now work out, whenever somebody types in one of these URLs the website displays as something like:
https://mymainwebsite.co.uk/useraccounts/foodsite
Which is causing a few problems for me in various ways. What I am looking to achieve is to attach each domain to its directory path while keeping the URLs and being able to use the domain properly while also keeping mobile responsiveness.
Now this may seem like a really simple situation although I have a couple different domain hosts and my website hosting is via Hostinger, so I am not able to manipulate certain back end features, making it slightly more difficult for me. I am also still learning and really don't have much knowledge in DNS, IP forwarding, etc so I wouldn't know what I'm looking for?
If somebody can point me in the right direction I can more than likely figure the rest out on my own. I can access my htaccess file for the main website as well as DNS and ability to park domains etc...
Hope somebody can help me find a solution. Thanks.
I think you are looking for something called "Virtual Host". This is a configuration of the web server that allows you to run multiple web sites on the same server. In Apache simple virtual host looks like this:
<VirtualHost *:80>
DocumentRoot "/public_html/useraccounts/shopsite"
ServerName shopwebsite.co.uk
# Other directives here
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/public_html/useraccounts/carsite"
ServerName carwebsite.co.uk
# Other directives here
</VirtualHost>
There are no redirects in this method. The browser is connecting to the webserver and is sending "Host" header - the domain name typed in the URL, then it returns the files from the directory you configured in "DocumentRoot" directive for this "ServerName".
You should call your hosting provider support team and ask them how do you manage virtual hosts.
I am trying to migrate my website from server to localhost in prestashop. And i have tried following steps.
I assume you’ve configured PHP, Apache and MySQL on your local machine. If you don’t have those things installed, find some informations about how to do it. If you are using Windows I can suggest you installing XAMPP application.
Download all website files from your FTP and put them to the local directory.
Next, let’s export the database from phpMyAdmin to the .sql file and download it. Import that file to your local database.
Now it’s a time to make some changes in your local database, files and BackOffice.
Database:
Go to the table PS_SHOP_URL and change values of following columns:
– domain localhost
– domain_ssl localhost
– If your PrestaShop is located in some addictional directory, set the value of physical_uri (for example, if it’s in the ‘shop’ directory, write /shop/ there)
In the PS_CONFIGURATION table change the value of PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL
Files:
Set the debug mode ON in config/defines.inc.php
define('_PS_MODE_DEV_', true)
1
define('_PS_MODE_DEV_', true)
2. Set your local database parameters in config/settings.inc.php
If your PrestaShop is located in some addictional directory (for example /shop/), edit the .htaccess file. It’s located in PrestaShop main folder. Add to this part…
RewriteRule . - [E=REWRITEBASE:
1
RewriteRule . - [E=REWRITEBASE:
…that directory. Complete code should look like this:
RewriteRule . - [E=REWRITEBASE:/shop/
1
RewriteRule . - [E=REWRITEBASE:/shop/
BackOffice:
Advanced Parameters -> Performance
Select “Force compilation” in smarty settings, disable the cache and clear the cache using button located in upper right header of page.
And this sucessfully transfers my site to local host i am able to access backoffice.
but when i access frontoffice there errors as shown in screenshots
Check in backend under Preferences->Seo & URLs the section Set Shop Url to see if you have the correct url. As far as I can see in the printscreen, your website is still using the localhost url. Also, after checking in the backend, try accessing your website in another browser.
I have been searching an answer this redirecting problem. There are many similar question but I still cannot find how to solve.
I have set my domain from GoDaddy for my GAE application as below:
Set CNAME for www to ghs.googlehosted.comdomain follow to:
https://cloud.google.com/appengine/docs/domain
Enable my naked domain by setting A and AAAA records follow to: https://support.google.com/a/answer/2579995
From this step both of my naked domain and my www are working perfectly.
However refer to the 'Site Setting' of 'Google WebMaster Tools' it is advised to decide a preferred domain either www or naked domain and set 301 redirect to the preferred one. So I decided to set my naked domain as my preferred one.
In my domain setting at GAE and my account at GoDaddy I deleted CNAME for www record and create at GoDaddy 'New Subdomain Forward' of www to http of my naked domain with type 301 (Permanent). However now my www domain come with this error:.
404. That’s an error.
The requested URL / was not found on this server. That’s all we know.
I checked my naked domain is still work. Could anyone advise what I have been misiing?
Finally I found solution how to solve this domain redirecting problem.
I came to this help article: Updating Your Domain Name's IP Address for Forwarding from GoDaddy Support, stating that I must update the domain address manually so domain name forwarding services work correctly.
But instead of replacing all of the '#' Host in A record into this forwarding address I just need to add a separate host record name it 'www' to point the www domain to 50.63.202.1 to be forwarded and left the other original A and AAAA records as they are need for the naked domain to serve from GAE Application.
So after updating the records in A Host it will look like this:
Host Points To
# 216.239.32.21
# 216.239.34.21
# 216.239.36.21
# 216.239.38.21
www 50.63.202.1
Redirecting is work correctly now. My www domain is now redirecting to my naked domain. Off course the page will took some time to show up than point http directly to the naked domain but seems all is OK.
Hope this will also help others who preferably want to set their naked domain (non-www) as the preferred domain rather than the www domain.
I have a mobile website locally hosted in IIS7. I want to view it in my android phone. This is not the usual case of accessing 127.0.0.1, which I have done already.
I set an inbound rule in Firewall for port 80. My IP, assigned by router, 198.162.2.10, which when open in my mobile shows the IIS7 image.
The problem I face is, I usually do the project in D:\ drive than in wwwroot, not to loose any files in case of OS crash or re-install. So to link these projects, I create a website in IIS and give a naming like myprofile.net and assign it to 127.0.0.1. So when I type myprofile.net in the browser, the website is rendered.
How do I access this website, from my android phone?
I know a "workaround" to
copy all the websites into wwwroot? That negates the main point.
connecting phone to PC's ad-hoc or vice versa? I don't want this, either of this puts my computer from internet, and developing without internet is impossible.
upload to ftp server and view from phone? This is what I am currently doing.
Is there a solution?
You could make a symlink to your websites' files on the D:\ to your wwwroot directory.
Here's a tutorial link
and a custom command for you:
C:\mklink /D C:\path\to\wwwroot\NameOfWebsite D:\path\to\website\to\create\the\symlink\for\NameOfWebsite
Also if you may need to updated your virtualhost file... I use apache, been 6+ years since I used IIS :/ so hopefully this is relevant:
example of what you'll want to change:
<VirtualHost *:80>
ServerAdmin gopikrishna.s#gmail.com
DocumentRoot "C:\path\to\wwwroot\NameOfWebsite"
ServerName NameOfWebsite
<Directory "C:\path\to\wwwroot\NameOfWebsite">
Options Indexes FollowSymLinks ExecCGI MultiViews #NOTE THESE OPTIONS Follow SymLinks is NEEDED
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#EXAMPLE alias if you have any.
#Alias /graphics "D:/workspace/graphics"
</VirtualHost>
You will also have to update the hosts file located normally in
C:\Windows\System32\drivers\etc
right click notepad and run as administator to make edit's to the system file hosts.
click File->Open
locate your hosts file directory
change Text Documents (.txt) to All Files (.*) to see the hosts file (among others)
open the hosts file and add this line to the bottom of the file:
127.0.0.1 NameOfWebsite
This line should have the same name you put as your ServerName in your httpd-vhosts.conf file or the IIS equivalent.
Save the hosts file and reset your IIS server
Now you should be able to run in your android's browser (if connected to your local router which the IIS server is also connected to) the web server's IP address which as mention in your post would be
198.162.2.10
and that should show your websites in your android's browser.
Also be sure to put which ever website you want to see in your browser at the top of any other vhost configurations.
That is to say:
in your hosts file make sure if their are other lines like
127.0.0.1 some.site.local
127.0.0.1 another.site
127.0.0.1 NameOfWebsite <------ This should go
That you put the one you want to see at the top of the list like so:
127.0.0.1 NameOfWebsite <-------- HERE
127.0.0.1 some.site.local
127.0.0.1 another.site
And for the httpd-vhosts.conf file make sure the whole ........
Section is above all others.
I hope this helps a bit, feel free to add anything or subtract anything changes are more than welcomed. Forgive me if I over spoke on this post or gave details you already knew.
I think the symlinks are basically all you need, but the other stuff probably will help as well.
It is necessary to load on one domain name pages from different web servers (apache2). For example, www.somesite.ru/page/ loads from server 12.34.56.78 and www.somesite.ru/another_page/ loads from another server 12.34.56.79.
How to make, what it would work?
Solved.
on ip .78 I used mod_rewrite + mod_proxy.
RewriteRule ^/(another_page)/?$ http://www2.somesite.ru/$1 [P]
www2.somesite.ru has ip .79