Differences

This shows you the differences between the selected revisions of the page.

2016-10-07 2016-11-11
there's arelady "search" anchor in the template (martin) https for example.com (martin)
Line 61: Line 61:
<code>!`cmd.exe /c echo @echo off > %TEMP%\url.bat & <code>!`cmd.exe /c echo @echo off > %TEMP%\url.bat &
echo set FILE_PATH=%1 >> %TEMP%\url.bat & echo set FILE_PATH=%1 >> %TEMP%\url.bat &
-echo echo http://www.example.com%FILE_PATH:home/user/public_html=~user% >> %TEMP%\url.bat`+echo echo https://www.example.com%FILE_PATH:home/user/public_html=~user% >> %TEMP%\url.bat`
cmd.exe /c %TEMP%\url.bat !/! & pause</code> cmd.exe /c %TEMP%\url.bat !/! & pause</code>
Line 69: Line 69:
  * Check custom command options //Local command// and //Use remote files//.   * Check custom command options //Local command// and //Use remote files//.
  * If you want to copy the %%URL%% to clipboard instead of displaying it, replace the trailing ''& pause'' with ''| clip''.   * If you want to copy the %%URL%% to clipboard instead of displaying it, replace the trailing ''& pause'' with ''| clip''.
-  * For your particular use, just replace ''%%http://www.example.com%%'' with right %%URL%% prefix, ''home/user/public_html'' with right path prefix and ''~user'' with right %%URL%% replacement (it can even be empty in some cases).+  * For your particular use, just replace ''%%https://www.example.com%%'' with right %%URL%% prefix, ''home/user/public_html'' with right path prefix and ''~user'' with right %%URL%% replacement (it can even be empty in some cases).
==== Using Remote PHP Code ==== ==== Using Remote PHP Code ====
Example shows how to launch simple PHP script that maps file path to URL. Example shows how to launch simple PHP script that maps file path to URL.
-<code>echo '<?="http://www.example.com".str_replace("home/user/public_html", "~user", "'`pwd`'")."/!\n"?>' | php -q</code>+<code>echo '<?="https://www.example.com".str_replace("home/user/public_html", "~user", "'`pwd`'")."/!\n"?>' | php -q</code>
Hints: Hints:
Line 80: Line 80:
  * Note that the above should be entered as one line!   * Note that the above should be entered as one line!
  * Do not forget to check custom command option //Show results in terminal// or //Copy results to clipboard//, otherwise you will not get the results. You may also want to use the command for directories, check //Apply to directories// too.   * Do not forget to check custom command option //Show results in terminal// or //Copy results to clipboard//, otherwise you will not get the results. You may also want to use the command for directories, check //Apply to directories// too.
-  * For your particular use, just replace ''%%http://www.example.com%%'' with right URL prefix, ''home/user/public_html'' with right path prefix and ''~user'' with right %%URL%% replacement (it can even be empty in some cases).+  * For your particular use, just replace ''%%https://www.example.com%%'' with right URL prefix, ''home/user/public_html'' with right path prefix and ''~user'' with right %%URL%% replacement (it can even be empty in some cases).
  * If you do mapping like above, i.e. for server containing multiple user's homepages, you can make it universal by replacing ''user'' with ''%%'`whoami`'%%''.   * If you do mapping like above, i.e. for server containing multiple user's homepages, you can make it universal by replacing ''user'' with ''%%'`whoami`'%%''.
Line 87: Line 87:
Another example using shell commands only, in case PHP is not available: Another example using shell commands only, in case PHP is not available:
-<code>echo 'http://www.example.com'`pwd`'/!' | sed s#home/user/public_html#~user#</code>+<code>echo 'https://www.example.com'`pwd`'/!' | sed s#home/user/public_html#~user#</code>

Last modified: by martin