Server fault issue [closed] - pdf

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I am trying to link to a specific page within a PDF.
For desktop the URL works with:
https://www.examsolutions.net/papers/edexcel/gcse/nov17/paper2/paper2QUE.pdf#page=3
It takes you to page three, but does not work on mobile. However if I use jQuery
if ($(window).width() < 600) {
$("a").each(function(){
var newUrl = $(this).attr('href').replace('page=', 'page');
$(this).attr('href', newUrl);
});
}
The URL is changed to:
https://www.examsolutions.net/papers/edexcel/gcse/nov17/paper2/paper2QUE.pdf#page3
The removeal of the '=' works, but only on iOS. Is there a solution for Android or is it not possible due to Adobe PDF licenseing etc?

Option A is fine - do that.
It depends what the set up is on your new hosting...
If you have cPanel you can add the old domain as a parked domain - takes 30 seconds to set up - then just point your name servers/DNS the new hosting.
Alternatively you can set up the old site on your new hosting, then do a 301 redirect in the .htaccess file pointing it to your new domain.
http://css-tricks.com/snippets/htaccess/301-redirects/

Thanks for all the helpful guidance, I took it all on board and thought I would post back what I actuall did incase someone else needs a breakdown. To be clear, my hosting is a VPS on a LAMP stack running Ubuntu.
Repointed the a-record of the old site to the new one.
Created a config file in the sites-available folder of apache2
Pointed that config file to where I wanted the hosted folder to be,
in my case home/www/vhosts/
Created a folder in the above in the name of the old website
Added the .htaccess file in that folder with the 301 redirect in it.
Made the website active my using the a2ensite command
Restarted apache

Related

How to access html file using local host [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
Please I need help with accessing my html/php file with localhost on my browser,i turn my xampp on and tried to access my html/php file,but it is still not working
That's what I keep getting everytime
The path component of the URL to your file starts at the directory specified in the DocumentRoot configuration option for your Apache HTTPD server. This probably defaults to the htdocs directory.
It doesn't start at the root of your filesystem. Web servers do not, by default, expose every file on your hard disk to the network (which would be a scary default for security reasons).
Normally you don't have to enter xampp/htdocs in the link. localhost is reffering to your xampp htdocs folder "automatically". Try localhost/phpinvscode
If you put your index.html file in the htdocs folder directly you would only need to enter localhost in the browser.

Special configuration of the vhost [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've got some headache trying to configure that for some days so I hope someone can help me.
I've got few sites, each one related to an FTP account. I would like to make them accessible through my man website by the url http://www.mainsite.com/site1. At this point an Alias should do the work.
However I would like to add some features such as specify the log file related to the site1 which would be in the web directory of the FTP account site1. Later, I would like to put them in /var/log and have a script to sync the log file located in the web directory with the one in /var/log so that even if a user delete the log file in the web directory, the original one is still here.
To go back to the main problem, I don't know how to do that, I tried to configure a whole vhost for the site1 but then, as the ServerName would be the same as the main site, the main site would no longer be accessible.
Any suggestions ?
You could try the ancient ServerPath directive, which will cause /site1 to be mapped to one vhost and /site2 to be mapped to another, despite having matching servername and local interface:port.

index.php appending to url [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a magento site which has index.php appended to the url you click on. I googled a lot to find the solution and i did what i could find.To clear my my doubts i uploaded htaccess file fresh copy from magento copy and made the url rewrite in configuation>system>web to yes and clear the cache too but still it put index.php in url.I have also double checked secure and unsecure link to see if it contain any index.php which it doesn't
I can do all what i can to do research and applied it but no change. What can i do or what can be wrong?
The steps you describe should be right:
System > Configuration > Web > Use Web Server Rewrites set to yes (also check the store view level value, because the scope for this is not global)
.htaccess present in document root
clear Magento cache
Additional things to check:
System > Configuration > Web > (Un)secure base url
does your Apache take into consideration .htaccess (AllowOverride)
how did you clear the cache
the scope for your settings System > Configuration > Web > Use Web Server Rewrites

Access new web site via browser with IP address? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Ive set up a new site with WHM but havent got the DNS set up yet. I want to be able to access the site via a browser so I can set up a CMS. Usually, I can just do this by entering the IP address into the browser, but this time I just get a page saying that Apache is working on the server.
Does anyone know a way round this?
Thanks!
The problem is that the request your browser is sending doesn't include the correct Host: in the HTTP header, so the web server replies with the a default catch-all page.
You can either
setup a private (local) authoritative DNS server with a yoursite.com zone, and set your system's DNS to point to this DNS server, or
temporarily trick the DNS resolution in your local system by registering whatever.yoursite.com with it's corresponding IP address in /etc/hosts file (in unix-like systems). There's an equivalent file in MS Windows systems, look for a file named hosts in C:\Windows\system32\drivers\etc.
I'd try with the latter first, as it's just a matter of adding a single line to a text file:
203.0.113.22 whatever.yoursite.com
You may need to restart your browser.

Using GoDaddy Domain Hosting to link to Amazon S3 Website [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
So I have some domains hosted at GoDaddy.com. I am trying to avoid to pay for a hosting service, except for using a static Amazon S3 page (as I don't expect much traffic at all for these sites). I have had some success, but not sure if this is a poor solution...
What I did for domain.com:
Set up permanent forwarding on GoDaddy to www.domain.com
Remove all DNS except for the A address to the GoDaddy IP, and a CNAME of www to the Amazon S3 site
It works as planned if someone types in www.domain.com. It seems to work alright for domain.com, too. However, it seems to do a 302 redirect instead of 301 even when I tell GoDaddy to have it be a permanent forward. I can ultimately goto Google Webmaster tools and say that I want it to use www.domain.com. However, that seems a little excessive.
Any suggestions on how to make this solution work better?
Possibly by changing some of the DNS settings or some other GoDaddy options that I don't know about?
You must name your S3 bucket the same as your domain, "www.example.com" Make sure you include the "www." subdomain prefix as part of the bucket name.
Set up your bucket as a web site per Amazon's instructions!. Make sure you have an "index.htm" file name entered and the correct bucket policy setup under Permissions.
Under Godaddy DNS settings make just one entry, set Host WWW CNAME, points to, "s3-website-us-east-1.amazonaws.com" or whatever s3 domain Amazon supplies for your bucket. You leave off the "http://www.example.com." heading in the url that Amazon supplies.
The last step under Forwarding/manage is to "forward only" your naked domain name "example.com" to "www.example.com"
If you did it right your browser will display your site as "www.example.com" whether you entered the www or not when you entered the url.
NOTE: You could just Forward to your bucket using the complete bucket url with "name masking", however most web crawlers will not see your complete site if you do it that way and web searches will fail.
Be sure to wait at least 30 minutes before testing your changes and by all means clear your cache in your browser or it will use the old address that it remembers from the past.
The DNS-apex-requires-an-A-record problem is definitely not well solved.
I can't personally vouch for them, but www.wwwizer.com hosts a free redirect service.