Search Results

Search found 18982 results on 760 pages for 'url rewriting'.

Page 9/760 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Rewriting URL's in codeigniter with url_title()?

    - by Craig Ward
    I am rewriting my website with codeigniter and have something I want to do but not sure it is possible. I have a gallery on my site powered by the Flickr API. Here is an example of the code I use to display the Landscape pictures: <?php foreach ($landscapes->photoset->photo as $l->photoset->photo) : ?> <a >photoset->photo->farm ?>/<?php echo $l->photoset->photo->server ?>/<?php echo $l->photoset->photo->id ?>/<?php echo $l->photoset->photo->secret ?>/<?php echo $l->photoset->photo->title ?>'> <img class='f_thumb'>photoset->photo->farm ?>.static.flickr.com/<?php echo $l->photoset->photo->server ?>/<?php echo $l->photoset->photo->id ?>_<?php echo $l->photoset->photo->secret ?>_s.jpg' title='<?php echo $l->photoset->photo->title ?>' alt='<?php echo $l->photoset->photo->title ?>' /></a> <?php endforeach; ?> As you can see when a user clicks on a picture I pass over the Farm, Server, ID, Secret and Title elements using URI segments and build the page in the controller using $data['farm'] = $this->uri->segment(3); $data['server'] = $this->uri->segment(4); $data['id'] = $this->uri->segment(5); $data['secret'] = $this->uri->segment(6); $data['title'] = $this->uri->segment(7); Everything works and is fine but the URL’s are a tad long, example “http://localhost:8888/wip/index.php/gallery/focus/3/2682/4368875046/e8f97f61d9/Old Mill House in Donegal” Is there a way to rewrite the URL so its more like “http://localhost:8888/wip/index.php/gallery/focus/Old_Mill_House_in_Donegal” I was looking at using: $url_title = $this->uri->segment(7); $url_title = url_title($url_title, 'underscore', TRUE); But I don’t seem to be able to get it to work. Any ideas?

    Read the article

  • htaccess mask dynamic url with a static url

    - by Enkay
    I'm trying to do something with .htaccess that I'm not sure can be done. First thing I did is hide the .php extensions using the following code: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php Works great. Now what I'm trying to do and can't seem to figure out is the following: When a user types "mywebsite.com/products?id=12345" into the browser address bar, I want the server to serve the right product page according to the ID but display it in the address bar as "mywebsite.com/product" no matter what the product ID is. Is this possible to do? If yes how? Thanks

    Read the article

  • PHP Form POST to external URL with Redirect to another URL

    - by Marlon
    So, what I am trying to accomplish is have a self-posting PHP form, POST to an external page (using CURL) which in turn redirects to another page. Currently, what is happening is that once I click "Submit" on the form (in contact.php) it will POST to itself (as it is a self-posting form). The script then prepares the POST using CURL and performs the post. The external page does its processing and then, the external page is supposed to redirect back to another page, in a referring domain. However, what happens instead, is that it seems like the contact.php page loads the HTML from the page the external page redirected to, and then, the contact.php's HTML loads after that, ON THE SAME PAGE. The effect, is what looks like two separate pages rendered as one page. Naturally, I just want to perform the POST and have the browser render the page it is supposed to redirect to as specified by the external page. Here is the code I have so far: <?php if(isset($_POST['submit'])) { doCURLPost(); } function doCURLPost() { $emailid = "2, 4"; $hotel = $_POST['hotel']; //you will need to setup an array of fields to post with //then create the post string $data = array ( "recipient" => $emailid, "subject" => "Hotel Contact Form", "redirect" => "http://www.localhost.com/thanx.htm", "Will be staying in hotel: " => $_POST['hotel'], "Name" => $_POST['Name'], "Phone" => $_POST['Phone'], "Comments" => $_POST['Comments']); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.externallink.com/external.aspx"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Referer: http://www.localhost.com/contact.php")); $output = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); } ?>

    Read the article

  • URL naming conventions

    - by LookitsPuck
    So, this may be a can of worms. But I'm curious what your practices are? For example, let's say your website consists of the following needs (very basic): A landing page An information page for an event (static) A listing of places for that event (dynamic) An information page for each place With that said, how would you design your URLs? Typically, I'd do something like the following: www.domain.com/ - landing page [also accessible via www.domain.com/home] www.domain.com/event - event information page www.domain.com/places - listing of all places www.domain.com/places/{id} - place information page Now, here's a question. Just grammatically speaking, I have a hangup of referring to a given place in a url as being plural. Shouldn't it make more sense to go with this: www.domain.com/place/{id} as opposed to www.domain.com/places/{id} In some frameworks, you have a convention to follow (for example, ASP.NET MVC) by default. Yes, you can define custom routes to have /place/{id} route to the PlacesController. However, I'm just trying to keep this a bit abstract in discussion. With that being said, let's see for instance on another page of your site, you have a link, that when clicked, would open a modal popup populated with place information. Where you place that information? We could go with something like this: www.domain.com/ajax/places/{id} OR www.domain.com/places/{id} and serve based on the request header (that is, if requesting JSON, return JSON?}. Finally, for SEO reasons, typically I use a slug associated with a given resource. So, something like such: www.domain.com/ajax/places/{id}/london Where london is only there to add decoration to the link for SEO reasons. Is this sound? I ask all of these questions, because these are practices that I've been using for awhile, and I'd just like to see what other developers are doing or if I'm approaching things incorrectly. Thanks!

    Read the article

  • Grails - Language prefix in url mappings

    - by Art79
    Hi there im having problem with language mappings. The way i want it to work is that language is encoded in the url like /appname/de/mycontroller/whatever If you go to /appname/mycontroller/action it should check your session and if there is no session pick language based on browser preference and redirect to the language prefixed site. If you have session then it will display english. English does not have en prefix (to make it harder). So i created mappings like this: class UrlMappings { static mappings = { "/$lang/$controller/$action?/$id?"{ constraints { lang(matches:/pl|en/) } } "/$lang/store/$category" { controller = "storeItem" action = "index" constraints { lang(matches:/pl|en/) } } "/$lang/store" { controller = "storeItem" action = "index" constraints { lang(matches:/pl|en/) } } "/$controller/$action?/$id?"{ lang="en" constraints { } } "/store/$category" { lang="en" controller = "storeItem" action = "index" } "/store" { lang="en" controller = "storeItem" action = "index" } "/"(view:"/index") "500"(view:'/error') } } Its not fully working and langs are hardcoded just for now. I think i did something wrong. Some of the reverse mappings work but some dont add language. If i use link tag and pass params:[lang:'pl'] then it works but if i add params:[lang:'pl', page:2] then it does not. In the second case both lang and page number become parameters in the query string. What is worse they dont affect the locale so page shows in english. Can anyone please point me to the documentation what are the rules of reverse mappings or even better how to implement such language prefix in a good way ? THANKS

    Read the article

  • jQuery / Loading content into div and changing url's (working but buggy)

    - by Bruno
    This is working, but I'm not being able to set an index.html file on my server root where i can specify the first page to go. It also get very buggy in some situations. Basically it's a common site (menu content) but the idea is to load the content without refreshing the page, defining the div to load the content, and make each page accessible by the url. One of the biggest problems here it's dealing with all url situations that may occur. The ideal would be to have a rel="divToLoadOn" and then pass it on my loadContent() function... so I would like or ideas/solutions for this please. Thanks in advance! //if page comes from URL if(window.location.hash != ''){ var url = window.location.hash; url = '..'+url.substr(1, url.length); loadContent(url); } //if page comes from an internal link $("a:not([target])").click(function(e){ e.preventDefault(); var url = $(this).attr("href"); if(url != '#'){ loadContent($(this).attr("href")); } }); //LOAD CONTENT function loadContent(url){ var contentContainer = $("#content"); //set load animation $(contentContainer).ajaxStart(function() { $(this).html('loading...'); }); $.ajax({ url: url, dataType: "html", success: function(data){ //store data globally so it can be used on complete window.data = data; }, complete: function(){ var content = $(data).find("#content").html(); var contentTitle = $(data).find("title").text(); //change url var parsedUrl = url.substr(2,url.length) window.location.hash = parsedUrl; //change title var titleRegex = /(.*)<\/title/.exec(data); contentTitle = titleRegex[1]; document.title = contentTitle; //renew content $(contentContainer).fadeOut(function(){ $(this).html(content).fadeIn(); }); }); }

    Read the article

  • IIS URl Rewrite working inconsistently?

    - by Don Jones
    I'm having some oddness with the URL rewriting in IIS 7. Here's my Web.config (below). You'll see "imported rule 3," which grabs attempts to access /sitemap.xml and redirects them to /sitemap/index. That rule works great. Right below it is imported rule 4, which grabs attempts to access /wlwmanifest.xml and redirects them to /mwapi/wlwmanifest. That rule does NOT work. (BTW, I do know it's "rewriting" not "redirecting" - that's what I want). So... why would two identically-configured rules not work the same way? Order makes no different; Imported Rule 4 doesn't work even if it's in the first position. Thanks for any advice! EDIT: Let me represent the rules in .htaccess format so they don't get eaten :) RewriteEngine On # skip existing files and folders RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] # get special XML files RewriteRule ^(.*)sitemap.xml$ /sitemap/index [NC] RewriteRule ^(.*)wlwmanifest.xml$ /mwapi/index [NC] # send everything to index RewriteRule ^.*$ index.php [NC,L] The "sitemap" rewrite rule works fine; the 'wlwmanifest' rule returns a "not found." Weird.

    Read the article

  • Asp.net url rewriting and domain redirection

    - by GregM
    I have a domain "test.com" and I want this domain to redirect to "mydomain.com/test". I'm with 1and1 for my domain test.com and with discountAsp for mydomain.com. In the control panel of 1and1 you can set a redirection from a domain to another domain, so everything is fine. But when i'm on the page mydomain.com/test I want my url to be rewritten as test.com Is this possible to do that with IIS or in my asp.page (would prefer in my page) I'm using iis7 Thanks

    Read the article

  • ASP.NET, IIS 6 and url rewriting

    - by stighy
    Hi, i've bought a shared hosting on a windows hoster with IIS 6. I would like to know how to rewrite url. I can't modify anything on the server, the only thing i can do is to use ... my asp.net code ! some advice ? Thanks!

    Read the article

  • How to suppress PHPSESSID in URL for Googlebot?

    - by Roque Santa Cruz
    I use cookie based sessions, and they work for normal interaction with our site. However, when Googlebot comes crawling out PHP framework, Yii, needs to append ?PHPSESSID to each URL, which doesn't look that good in SERP. Any ways to suppress this behavior? PS. I tried to utilize ini_set('session.use_only_cookies', '1');, but it does not work. PPS. To get an impression of the SERP, they look like this: http://www.google.com/search?q=site:wwwdup.uni-leipzig.de+inurl:jobportal

    Read the article

  • Asterix in URL?

    - by KajMagnus
    Are there any reasons I shouldn't use an asterix (*) in a URL? Background: With asterixes, I could provide these nice and user friendly (or what do you think??) URLs: example.com/some/folder/search-phrase* means search for pages with names starting with "search-phrase", located in /some/folder/. example.com/some/**/*search-phrase* means search for any page with "search-phrase" anywhere in its name. example.com/some/folder/* means list all pages in /some/folder/ (rather than showing the /some/folder/index page).

    Read the article

  • Are backlinks transitive when old URL is forwarded to new URL?

    - by JVerstry
    Say there are two companies operating in the same industry: www.companya.com and www.companyb.com. Company A has acquired some backlinks over time. Company B acquires company A and decides to only use its URL. It forwards properly all links from www.companya.com to www.companyb.com. Will company B benefit from the backlinks of www.companya.com through the redirection? Is it worth the effort from a backlink perspective only?

    Read the article

  • Using URL Rewrite with QDIG

    - by The Official Microsoft IIS Site
    One of the applications that I like to use on my websites it the Quick Digital Image Gallery (QDIG) , which is a simple PHP-based image gallery that has just enough features to be really useful without a lot of work on my part to get it working. (Simple is always better - ;-] .) Here's a screenshot of QDIG in action with some Bing photos: (Click to enlarge photo.) The trouble is, QDIG creates some really heinous query string lines; see the URL line in the following screenshot for an example:...(read more)

    Read the article

  • Can I use Zoneedit to do URL rewrite?

    - by chilly-child
    This is our scenario: Our DNS is hosted by a company. They don't manage the DNS. We use Zoneedit (www.zoneedit.com) to manage the DNS such as nameservers, CNAMEs, etc... Then we have our web host where we just have our files hosted. We have a subdomain created on zoneedit. We would like to do a URL rewrite so that subdomain.ourdomain.com is displayed as www.ourdomain.com/subdomain. Do I use Zoneedit to do the URL rewrite or the web host or the DNS host? I checked the Zoneedit docs but I could not find a way to do a URL rewrite. Need some advice. Thanks

    Read the article

  • Squid url rewrites https>>http

    - by bobfran
    I'm exploring some uses with Squid proxy 2.7 and I have seen a good number of examples for url rewrites that take urls such as: http: //somesitename.com and then the rewriter can change the url to: https: //somesitename.com And those examples work great. What I'm wondering though, is if its possible to do the reverse with a squid url rewriter. that is, to go from https: //somesitename.com to http: //somesitename.com ? Simply trying to edit the script file that handles the rewrites doesn't seem to do the trick. So I was wondering if there are some certain things I have to configure squid to do first, if its even possible to do what I am asking. I have my browser manually set up to have squid as a proxy for all requests and I can see https requests showing up in my squid access.log file (via the CONNECT method).

    Read the article

  • Clean URLS with mod rewrite and URL Encoded characters causes 404?

    - by Richard JP Le Guen
    I have a web site using mod_rewrite to get some clean urls and custom 404 pages. My .htaccess file looks like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?clean_url=$1 [QSA,L] </IfModule> What puzzles me is that if the URL contains a %2F (url-encoded /) the server seems to force a 404. As an example, http://example.com/category/article would be a normal article, but then http://example.com/category%2farticle gives a server-generated 404 page. (not the custom 404 page) I wouldn't have expected this... why this is happening? Is there a way around it?

    Read the article

  • Understanding Regular Expressions (focus on URL Rewrite)–Part 10 (Sub-Part 1 of 2)

    - by OWScott
    Regular Expressions can seem difficult to understand.  In today’s lesson I attempt to bring this down to earth and make it understandable and useful for the web administrator.  While this focuses on URL Rewrite, this lesson is useful for Visual Studio, ASP.NET development and JavaScript development also. I couldn’t keep this within 10-15 minutes so this is Part 1 of 2 on Regular Expressions. This is week 10 of a 52 week series on various web administration related tasks.  Past and future videos can be found here.

    Read the article

  • Understanding Regular Expressions (focus on URL Rewrite)–Part 11 (Sub-Part 2 of 2)

    - by OWScott
    This 2nd part (out of 2) on Regular Expressions covers the remaining tips necessary to get up to speed on a topic that at first seems daunting, but really isn’t that bad. Whether you use Regular Expressions for URL Rewrite, Visual Studio, PowerShell, programming or any other tool, these tips will allow you to understand the essentials of Regular Expressions. Be sure to watch Part 1 first. This is week 11 of a 52 week series on various web administration related tasks. Past and future videos can be found here.

    Read the article

  • Does the keyword blog in url impove seo?

    - by slow diver
    I have seen a couple of site which has high number of hits. They are mostly tutorial sites and blogs that address software issue/errors. I wonder if the kewybord "blog" has a very positive effect in SEO? In my own site, I have install word press in root folder to avoid any blog keyword. I also did this to keep urls shallow (deeper url are not good for SEO). But I may want to think on it again. The sites I am referring too are http://blog.sqlauthority.com http://veerasundar.com/blog/2011/11/making-xampp-to-serve-any-directory-outside-htdocs/ I know there are standard (sort of) class names or ID that identify different contents and makes it easier for the search engine to identify contents like, "container", "menu". The use of word "blog" would mean this is about dicussing/tutoring something and have a very positive effect on SEO?

    Read the article

  • Recovery from URL structure change?

    - by Dejan Pelzel
    in July this year, we have changed the URL structure of the website from: Post: domain.com/blog/post/986/dance/heart-beats-dance-video-by-chinatsu/ Category: domain.com/blog/index/cosplay/ to Post: domain.com/dance/heart-beats-dance-video-by-chinatsu-986/ Category: domain.com/cosplay/ Everything was (supposedly) properly redirected with 301 redirects and it first seemed that the traffic returned after a couple of days, but it has now been close to 2 months and things keep going worse although Google is slowly indexing the changes. What is worrying me even more is that the Pages crawled per day from Webmaster Tools started drastically dropping a few days ago and has just reached a new low in months (from over 2000 to 700). Should I be worried or will things sort out eventually?

    Read the article

  • URL structure for content that is updated daily

    - by Brendon
    A small, simple site I am working on displays a single page with the day's best offers on it. The user is able to move back and forth between previous days. Which of the following URL structures works best? Structure 1 /index.html -- today's best offers /2013-06-29.html -- yesterday's best offers, etc. Structure 2 /index.html -- 302 redirects to /2013-06-30.html (or whatever today is) /2013-06-30.html -- today's best offers /2013-06-29.html -- yesterday's best offers, etc. I quite like structure 2 from the user's point of view (they can share content easily), but I am a bit concerned about updating the redirect from /index.html every single day -- would this perhaps have unintended SEO consequences?

    Read the article

  • Getting a domain sub-directory url for a new server

    - by Xianlin
    I have an web application server running tomcat and i need to publish my APIs to internet users. However I don't have a domain name for this server and I can only put the ip address of this server (e.g. 145.XXX.XXX.XXX) to point out where my API xml files are located. I have another web server running with a domain name "http://www.webserver.com" registered on the internet and I want to make use of its domain name to server my web application server API xml files location. How can I do that? using "www.webserver.com/api" or using "api.webserver.com"? which is better? Also I wonder if I want to publish a "rstp://145.XXX.XXX.XXX" web link for video streaming purpose, can I use "rstp://www.webserver.com/api" to replace it and how to do it? I always thought the url contain domain sub-directory name cannot point to another IP address, it only can point to another folder location on the webserver itself.

    Read the article

  • Accented characters representation in the URL

    - by Dan
    We have support for various languages in our website, including Spanish, French and Swedish. For now, the links in the site are NOT encoded before sent to the browser, sending the real accented chars (if such exists, i.e. href="www.(dot)example(dot)com/héllo.html") and not their HEX representation. This works & looks good on all browsers, including Chrome, FF and IE. However, we care great deal about SEO. We got this tip that encoding the links before sending them to the browser (so instead of linking to http://www.example.com/héllo, we will link to http://www.example.com/h%E9llo) will improve the way search engines will 'understand' the links and the keywords in the URL. This involves some work at our side, so we wanted to know if there's truth in that tip, but couldn't find anything addressing this issue.

    Read the article

  • Working with different URL structures

    - by Dane411
    As I'm quite newbie to this field, I've doubts and there are some I couldn't find on Google, i.e: If I'm not wrong, index.html makes it possible to avoid to add the filename to the url, www.example.com/ is equal to www.example.com/index.html. And that works for the following subdirectories, right? www.example.com/music/ Is there any other way to achieve this without using an index.html file? (I've read smth about converting dynamic urls to static: ./?var1=value1&varN=valueN - ./value1/valueN) How can I convert www.example.com/music/ to music.example.com/ and why should it be used? Thanks in advance!

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >