Why do I have to add /Content/ to the uri when using Url.Content? What's the method useful for? :) Am I missing something?
<link rel="stylesheet" type="text/css" href="<%= Url.Content("~/Content/StyleSheets/screen.css") %>" media="screen" />
...
I have a search box that sends an ajax request to a snippet. When the snipped function gets called I would like the search query to get added to the URL via a anchor hash (ala: http://localhost/search#param) so I can recreate the search request if the user copies the URL and comes back later. Obviously the other side to this is pulling t...
I currently have the following JavaScript function that will take current URL and concatenate it to another site URL to route it to the appropriate feedback group:
function sendFeedback() {
url = window.location.href;
newwin = window.open('http://www.anothersite.com/home/feedback/?s=' + url, 'Feedback');
}
Not sure if this is ...
Hi, I have an address on my site like so:
http://www.example.com/lookup?q=http%3A%2F%2Fgigaom.com%2F2010%2F10%2F10%2Fangry-birds-for-windows7-phone-dont-count-on-it%2F
In this example, the dot in the 'gigaom.com' part of the query string is screwing with lighttpd and my rewrite rules. I get a 404 with the dot in, no 404 if I take the d...
I am using ajax to load pages on my website.
Each time a page is loaded I change the url in the browser to
http//www.example.com/old/page/#!/new/page/
by setting it through window.loaction using javascript
Now what I want to do is when someone comes to my website by entering the url
http//www.example.com/old/page/#!/new/page/
he s...
We have a server which has ScriptA.php, ScriptB.php and ScriptC.php which all contain text/images that are 80% similar.
We're using .htaccess to do url rewriting on ScriptC.php and we're noticing a performance slow down when it loads where it appears that the browser is loading the content afresh every time.
When I click on a link to S...
I've set up a simple gallery system in PHP that is built to display one image per page. My URL parameter simply uses a gallery variable and a page variable and does not use the image iD in any way to pull the image. This is because I'm setting my htaccess settings to make a friendly URL:
http://mysite.com/images/1/
^ Would pull the ...
Can someone explain what is happening in this URL? (I pulled it off a basic Amazon search and shortened the url= portion)
http://www.amazon.com/s/ref=nb_sb_noss?url=whatever
My mains questions are, where is the file extension of the requested page ? Is the requested page indeed nb_sb_noss ? What sort of server architecture allows thi...
I am building a new WordPress theme using register_post_type to create a custom post type called Listings.
I would like each listing to have the following permalink structure:
http://www.mysite.com/post-author/listing-title
I'm not quite sure how to achieve this with the CPT controls listed in the Codex. Any help or links would be gre...
We're using URLRewriter (http://urlrewriter.net), and would like to rewrite queries like this:
domain.com/find/red-boots
to this:
domain.com/search.aspx?k=red+boots
The sample code to go into the web.config is this (I'm a bit unfamiliar with this syntax)
<if url="/tags/(.+)" rewrite="/tagcloud.aspx?tag=$1" />
How can I code this lin...
We need to generate a unique URL from the title of a book - where the title can contain any character. How can we search-replace all the 'invalid' characters so that a valid and neat lookoing URL is generated?
For instance:
"The Great Book of PHP"
www.mysite.com/book/12345/the-great-book-of-php
"The Greatest !@#$ Book of PHP"
www.my...
Our SEO advisors are claiming that having our URLs in the form:
www.example.com/category/subcategory/
leads to better ranking in the search engines, etc., but I'm not sure if that's true/valid.
Do others use this practice in their own websites?
The simpler alternative for us would be to do something like:
www.example.com/showcat.p...
We have .htaccess setup to handle URLs like:
http://www.oursite.com/events/Health/Insectology/343/346.html
But clicking from such a generated page to:
http://www.oursite.com/events/Anything/Anything/abc/abc.html
Seems to reload the page completely (and not use the cached images).
(This question is related to http://stackoverflow.c...
I'm trying to create a multibyte safe title => url string converter, however I've run into the problem of not knowing how to allow legal asian (and other) characters in the url when removing others. This is the function set at the moment.
public static function convertAccentedCharacters($string)
{
$table ...
I have url rewrite rules which redirect www.domain2.com to a subfolder under the root of a domain1.com (let's call this folder subproject). In my controller, I need to construct a URL to the original non modified path but the Request.Url properties (like AbsoluteUri or LocalPath) always contain the subproject subfolder.
In other words, ...
I have read around through some questions and I understand that url rewriting causes issues that others have fixed but I seem to have found an odd case.
I have a News page that is filtered by tags. The Url for a filtered list is:
external: site.com/news/tag/[a tag]
internal: site.com/news/view.aspx?filter=[a tag]
When I log in on one ...
I'd like to try this out, downloaded it , read the readme, referenced the dll, edited the web.config.
I couldn't find any documentation besides the readme, and it seems that there is a lot to know to get it to work...so, I've been kind of grasping in the dark. I set-up a txt file, didn't know where to put it so dropped it in both the...
Hi guys,
I'm struggling with probably quite simple mod_rewrite taks.
This is the directory structure I have:
root\
translations\
en\ (contains various subfolders with files, 2 levels deep)
fr\ (contains various subfolders with files, 2 levels deep)
what I want to do is to point various dynamically created URLS to those specific...
Web frameworks such as Rails and Django has built-in support for "slugs" which are used to generate readable and SEO-friendly URLs:
Slugs in Rails
Slugs in Django
A slug string typically contains only of the characters a-z, 0-9 and - and can hence be written without URL-escaping (think "foo%20bar").
I'm looking for a Perl slug funct...
I've written a servlet which queries a database for a list of messages, the output is directed to servlet generated html. The user has the option of selecting to view a selected message by clicking a button
ResultSet rs = null;
try
{
startPage(response);
rs = statement.executeQuery(sql);
while(rs.next())
{
...