I've discovered that any time I do the following:
echo '<a href="http://" title="bla">huzzah</a>';
I end up with the following being rendered to the browser:
<a href="http:///" title="bla">huzzah</a>
This is particularly annoying when I link to a file with an extension, as it breaks the link.
Any ideas why this is happening and ho...
When I try to search a string starting with the slash / character in vi, the cursor jumps to the next search result from the previous search. However, I'd like to find the literal slash character. How can this be done?
...
I managed to solve this problem by the following code:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} ^GET\ /[^?\s]+.php
RewriteRule (.*).php$ /$1/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)/$ $1.php [L]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule .*[^/]$ $0/ [L,R=301]
In other words, no...
it seems windows insist on writing this slash on files' path \, while .net's URI class writing this the other way?
Is there any right way? that is accepted even in the most primitive systems?
And why the .net's URI is showing the other slash than windows does?
Thanks.
...
This is my code:
$route = new Zend_Controller_Router_Route_Regex('download/([^/]+)(/([^/]+))?/(\d+)/(\d+)',
array('controller' => 'download',
'action' => 'load'),
array(1 => 'name', 3 => 'or_name'...
I have a site that treats "/" and "%2F" in the path portion (not the query string) of a URL differently. Is this a bad thing to do according to either the RFC or the real world?
I ask because I keep running into little surprises with the web framework I'm using (Ruby on Rails) as well as the layers below that (Passenger, Apache, e.g., ...
I have this htaccess:
RewriteEngine On
# redirect with www
RewriteCond %{HTTP_HOST} ^mydomain [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1/ [R=301,L]
# add .php internally
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]
So my .php files can be called wit...
Have JSP variable ${remoteFolder}
It's value is \\file-srv\demo
Use jQuery embedded in this JSP.
jQuery resolves ${remoteFolder} variable as \file-srvdemo ,i.e. one slash is removed.
How to remain initial value of this var?
edited: when ${remoteFolder} is used inside form tag, that it resolved OK.
edited2:
JS part of JSP, slashes ...
Hi there
I've just started analyzing some data using R - unfortunately I have encountered some problem...
I'm reading in a (tab separted) csv file and want to process the data and there is one attribute I am particularly interested (which certainly exists within this csv). This is called:
data_transfer.Jingle/TCP.total_size_kb
Now when ...
I am using codeigniter.
My products page shows all the products we have and then users can click on each product_name to get more details about that particular product. So, I have declared products as the class and product_name as a function within the product class - so I could get the url www.company.com/products/product_name.
When I...
I use the following configuration for nginx: http://gist.github.com/340956
However, this configuration causes a No input file specified error with PHP. The only way I have been able to solve it is by altering this line:
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
Note the "/" between $document_root and $fast...
Hello.
My /train directory is aliased to a script in httpd.conf by:
WSGIScriptAlias /train /some-path/../django.wsgi
And it works well, except for one problem. If a user goes to /train (with no trailing slash) it will not redirect him to /train/, but will just give him the right page. This is a problem because this way the relative lin...
I've created a JAX-RS service (MyService) that has a number of sub resources, each of which is a subclass of MySubResource. The sub resource class being chosen is picked based on the parameters given in the MyService path, for example:
@Path("/") @Provides({"text/html", "text/xml"})
public class MyResource {
@Path("people/{id}") publ...
I have a apache web server that needs to reverse proxy a site. So example.com/test/ or example.com/test pull from the same other webserver. I have setup a reverse proxy for the one without the trailing slash like this:
ProxyPass /test http://othersite.com/test
ProxyPassReverse /testhttp://othersite.com/test
But it doesn't work with ...
Hello guys,
I'm testing a PHP mail form, a very barebones one, found here:
<?php
if(isset($_POST['submit']))
{
//The form has been submitted, prep a nice thank you message
$output = '<h3>Thanks for your message</h3>';
//Deal with the email
$to = '[email protected]';
$subject = 'you...
My site currently uses http and https sections based on the data being collected on the site (form data uses https).
On my index page, I have the PHP code at the top:
<?php
session_start();
ob_start();
if( $_SERVER['SERVER_PORT'] == 443) {
header('Location:http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])...
I know this question was asked a number of times on this site alone, but browsing through the relevant posts I couldn't find a solution. Trying to remove multiple trailing slashes after domain. The following mod_rewrite expressions seem to work for URLs such as http://www.domain.com//path1///path2////, but do not work for domain//
Direc...
end_date=$(date +"%m/%d/%Y")
/usr/bin/perl -pi -e "s/_end_date_/${end_date}/g" filename
I want to replace string '_end_date_' with current date. Since current date has slashes in it(yes I want the slashes), I need to escape them. How can I do this?
I've tried several ways like replacing slashes with "\/" using sed and perl itself but ...
I'm trying to write an sql function in Postgresql that will parse a file path.
I want to return just the file name.
I cannot get past getting an accurate text string in the function.
Here is the function:
Function: job_page("inputText" text)
DECLARE
$5 text;
BEGIN
$5 = quote_literal("inputText");
return $5;
END
When I run this:
sele...
I've got this dynamic t-sql:
declare @sql nvarchar(max)
set @sql =
N'
insert into #t
SELECT
row_number() over(order by getdate()) as RowNum,
d.value('''+@baseDateXpath+''', ''datetime'') as basedate,
pref.query(''.'') as XmlExtract
FROM
@content.nodes(''/*/*'') AS extract(pref)
CROSS APPLY
@content.nodes(''//*'') AS ...