This is my rewrite regex: ^([0-9]+)|/(.*)$ for rewrite 1234\article-name to article.aspx?id={R:1}.
The problem is: if the url is 1234, the page views count is increased with 1.
but if the url is: 1234/article-name the page views count increased in 6.
Any idea what is the problem and how to fix it? maybe the problem is with the regex.
Hi I have a wp installation with a static main page and posts page with the name articles.
My url rewirte string within wordpress is set to:
/%postname%
, and my htaccess file is set as follows:
RewriteEngine
On RewriteBase / RewriteCond
%{REQUEST_FILENAME} !-f RewriteCond
%{REQUEST_FILENAME} !-d RewriteRule .
/index.php [L]
When I browse to the articles page, my url rewrite looks like this:
example.com/articles/page/5
I would like to get a setting as follows:
example.com/articles/article/the-article-name
how would I achive this?
If you read the documentation of CodeIgniter or Kohana, there is a lot of confusion about the usage of URI and URL. Sometimes they use one and other times the other. They also incorporate URI class which makes it easier working with URLs.
I know that:
URI stands for Uniform Resource Identifier
URL stands for Uniform Resource Locator
But that doesn't make much sense. What exactly is the difference? or are they same?
Hey guys,
How can I, in PHP, get a summary of any URL? By summary, I mean something similar to the URL descriptions in Google web search results.
Is this possible? Is there already some kind of tool I can plug in to so I don't have to generate my own summaries?
I don't want to use metadata descriptions if possible.
-Dylan
<rule name="Query String Redirect">
<match url="home/address\.aspx\?city=jcity$" />
<action type="Redirect" url="city/jerseycity" appendQueryString="false"/>
</rule>
This does not work. What should be done to make it work?
When a URL redirect rule fires on a page with user controls the user controls are robbed of their child control events. Does anyone have a solution for how to make URL Rewrite and user controls play nice?
When using the cgi module in Python, I can't seem to figure out how to extract CGI variables in the URL. For example if the url servercgi.py?name=user , how do I get 'name' after import cgi? For some reason, form.getvalue and form['user'] do not work but if I print the object, I see something like FieldStorage(None, None, [MiniFieldStoreage('name', 'user')]).
Hi friends,
I'm new at Drupal. a question;
I create a hotels directory site. I created TaxonomyVocabulary for locations like London, Liverpool, etc... For example the url below lists the London
localhost/drupal/taxonomy/term/1
how can change that url to something like
localhost/drupal/hotels/london
is it possible? appreciate advices so much!!
How long can a URL be? I want to pass a lot of data through the query string. I think I remember that it depends on what different routers it passes through, but how long can the URL be and definitely not get truncated?
I can retrieve the url of current tab in firefox using
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator);
var mainWindow = wm.getMostRecentWindow("navigator:browser");
var tabbrowser = mainWindow.gBrowser;
var url = tabbrowser.currentURI.spec;
Now i want to do it for all tabs and save it in a string and if possible get it for tabs in the other ff windows as well. How can i do that?
Is there a way to rewite (or hijack) an absolute URL request made from a flash (swf) file in a browser?
Eg
I have a flash application that is requesting http://example.com/myImage.png
The code in the flash application cannot be changed but I want to be able to either use another flash or some javascript to write that URL as the image is beging requested - to something like
example.com/myImage.png?u=123456
following url will be fine:
http://localhost/mysite/mypage?param=123
if I want to put some special characters in param like ?, /, \, then the url looks like
http://localhost/mysite/mypage?param=a=?&b=/
or http://localhost/mysite/mypage?param=http://www.mysite.com/page2?a=\&b=...
it won't work. How to resolve this issue?
i have an application, and in my urls.py i have something like that:
urlpatterns = patterns('',
url(r'^profile_view/(?P<id>\d+)/$',
profile_view,
name='profile_view'),)
meaning that the profile_view function has id as a parameter.
Now, i want to call that function from my template, using a link like Reply
The problem is that i don't know how to use the above url as a link, meaning how can i 'pass the id parameter to a link'?
thank you
I am using jQuery. I'd like to get the path of the current URL and assign it to a variable.
Example URL:
http://localhost/menuname.de?foo=bar&number=0"
how i can handle this url in my website who is developed in mvc2
website.com/topic
website.com/topic/topic
are you give me some code to learn url routing in mvc
(r'^/(?P<the_param>[a-zA-z0-9_-]+)/$','myproject.myapp.views.myview'),
How can I change this so that "the_param" accepts a URL(encoded) as a parameter?
So, I want to pass a URL to it.
mydomain.com/http%3A//google.com
I have the URL
http://acme.example.com/view/view_container_content/15?javascript_disabled=true&container=aoeu
but I want it to look like
http://acme.example.com/view/container_name/content_name/
with friendly_id, I've seen how to do URL mapping with one object... but I haven't seen an example with two...
ideas?
I have an action link in one of my view page
<%=Html.ActionLink("Details", "Details", new { id = Model.Id })%> and redirects me to page which has a url like this http://localhost:1985/Materials/Details/2 instead of this i would like to have my url as http://localhost:1985/Materials/Details/steel material name instead of Id... Is this possible...... This is my controller action method,
public ActionResult Details(int id)
{
var material = consRepository.GetMaterial(id);
return View("Details", material);
}
Heyy there,
i have an application, and in my urls.py i have something like that:
urlpatterns = patterns('',
url(r'^profile_view/(?P<id>\d+)/$',
profile_view,
name='profile_view'),)
meaning that the profile_view function has id as a parameter. Now, i want to call that function from another template than the one associated with the def-view that has this url.
How should i do that? i have to put two render_to_response to one same function, in order to render the objects from both models?
thank you!
I put the code
RouteTable.Routes.MapPageRoute("md", "page1.html/{zxc}", "~/withmaster/page2.aspx");
at golbal Application_Start event .At masterpage link_event
Response.Redirect(Page.GetRouteUrl("md", new { zxc = "data" }));
Everything ok at local and iis7. The problem is that when i run this on the hosting
The access to requested URL has been denied.
Do i need some more thing to use url routing ...
On some pages in Google Analytics, there is a variable shown in the URL. The default value is 10. The URL always looks something like this:
...&trows=10&...
is there a way to change that to trows=100, so that the number of rows displayed by default is 100?
Thanks
I want to redirect from a old url which still appears in the google search to the new one. the old url is this:
http://www.marionettecolla.org/file%20_mostra_milano/mostra_marionette-milano.htm
and I want to redirect it to the home page:
http://www.marionettecolla.org/
I used this in my .htaccess:
Redirect http://marionettecolla.org/file\ _mostra_milano/mostra_marionette-milano.htm http://marionettecolla.org/
but I am getting Error 500... Does anybody know how to solve this problem?
Hi, all.
I have set up a url mapping that goes like this:
(r'enroll/$', 'enroll')
In my development environment this mapping is used when I visit '/enroll/'.
But in the production environment, the Django application is under '/activity/' and '/activity/enroll/' should be used.
Please tell me how do I get the correct url in both cases.
Thanks in advance.
I'd like to figure out the custom URL scheme for the Birdhouse iPhone app, but there doesn't seem to be any documentation.
Birdhouse is an app to store drafts for Twitter. I'd like to send it a string of text, and I know that it's possible:
Birdhouse responds to the URL birdhouse:///
The Twitter app sends drafts to Birdhouse if it's installed on your phone.
I've figured out the birdhouse:/// part, but how do I send the text?