PHP is running inside server1. Documents(.xls,.doc) available inside server2.
When I am redirecting to document path from php code (available at server1) the url becomes like this
server1<path>/server2/<documentname>
But I want to open url from php code is like this
server2/<documentname>
I dont want to include server1 path as prefix.
Is this possible in PHP?
venkyb47
0
Light Poster
Recommended Answers
Jump to PostNot sure what you asking for, provide your code. Anyway you could use
mod_alias
module in Apache:
Jump to PostThat path seems an intranet resource (UNC) rather then a web server. Can you confirm that? In this case I cannot help, I don't have much experience on Windows systems, so wait for …
Jump to PostThis:
\srv01\CDS\ITEMS\ITEMLIST.xlsBecomes this:
//srv01/CDS/ITEMS/ITEMLIST.xlsExample:
<a href="http://srv01/CDS/ITEMS/ITEMLIST.xls" target="_blank">Item List</a>
If your servers have static IP addresses avoid using hostnames as this will allow the link to continue working even if DNS fails or the host name is changed in the future.
All 9 Replies
cereal
1,524
Nearly a Senior Poster
Featured Poster
venkyb47
0
Light Poster
cereal
1,524
Nearly a Senior Poster
Featured Poster
mmcdonald
28
Posting Pro
venkyb47
0
Light Poster
mmcdonald
28
Posting Pro
venkyb47
0
Light Poster
mmcdonald
28
Posting Pro
venkyb47
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.