Search Results

Search found 28879 results on 1156 pages for 'pretty url'.

Page 83/1156 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • Nesting if else statements in PHP to validate a URL

    - by John
    I'm currently writing up a function in order to validate a URL by exploding it into different parts and matching those parts with strings I've defined. This is the function I'm using so far: function validTnet($tnet_url) { $tnet_2 = "defined2"; $tnet_3 = "defined3"; $tnet_5 = "defined5"; $tnet_7 = ""; if($exp_url[2] == $tnet_2) { #show true, proceed to next validation if($exp_url[3] == $tnet_3) { #true, and next if($exp_url[5] == $tnet_5) { #true, and last if($exp_url[7] == $tnet_7) { #true, valid } } } } else { echo "failed on tnet_2"; } } For some reason I'm unable to think of the way to code (or search for the proper term) of how to break out of the if statements that are nested. What I would like to do check each part of the URL, starting with $tnet_2, and if it fails one of the checks ($tnet_2, $tnet_3, $tnet_5 or $tnet_7), output that it fails, and break out of the if statement. Is there an easy way to accomplish this using some of the code I have already?

    Read the article

  • url rewrite & redirect question

    - by Shawn
    Say currently I have url like : http://mydomain.com/showpost.php?p=123 Now I want to make it prettier : http://mydomain.com/123/post-title I'm using apache rewrite which grabs segment '123' and put the url back to http://mydomain.com/showpost.php?p=123 OK. Here is the problem. I want to redirect the original non-pretty urls which were indexed by Google to the pretty versions, I want this because I heard that Google may punish me if he sees multiple urls pointing to identical content. So I need to redirect /showpost.php?p=123 to /123/post-title This I have to do in my php code coz there's no way Apache to be able to figure out the 'post-title', but if I put the redirect code in php code, then it will be a infinite loop, such as : Request : /showpost.php?p=123 redirected to : /123/post-title rewritten to: /showpost.php?p=123 redirected again to : /123/post-title ... So on and so forth. Sorry I should Google the solution first but I really don't know how to describe my situation in English to make Google return reasonable results. Please help me. Thanks.

    Read the article

  • Different canonical URLs for Facebook and Google?

    - by Victor P
    The following URLs point to the same resource: http://www.domain.com/books/123 http://www.domain.com/books/123-Harry-Potter http://www.domain.com/books/123-Harry-Potter-And-The-Deathly-Hallows I would like to use (1) as the canonical URL for OpenGraph/Facebook, so if you "like" (2) and (3) then will count for (1). But I would like to use (3) as the canonical URL for Google, because of SEO. Is this recommended?

    Read the article

  • How to make CodeIgniter accept "query string" URLs?

    - by Peter
    According to CI's docs, CodeIgniter uses a segment-based approach, for example: example.com/my/group If I want to find a specific group (id=5), I can visit example.com/my/group/5 And in the controller, define function group($id='') { ... } Now I want to use the traditional approach, which CI calls "query string" URL. Example: example.com/my/group?id=5 If I go to this URL directly, I get a 404 page not found. So how can I enable this?

    Read the article

  • Rewrite query string "?x=y" style to "/x/y" style

    - by Ross
    I have a PHP MVC framework I've built from scratch which uses the traditional domain.com/controller/action URL routing. While I'm currently handling the below conversion in the router I'd like to replace them in the URL for cosmetic reasons. For example: controller/action?filter=bank Becomes: controller/action/filter/bank I've done a bit of experimentation with a regex but can't seem to find a match. I'm also not sure how to rewrite it using RewriteCond. Thanks in advance.

    Read the article

  • magento - webserver question

    - by WANNABE
    I've uploaded the Magento installation file to my hosting and I've been told to go to the URL you uploaded it to using you browser, then the installation wizard will run you through the processes. I uploaded to /home/domain/public_html/magneto What URL should I use to access it? Thanks in advance

    Read the article

  • Change post permalink structure on WordPress to use custom taxonomy

    - by TiuTalk
    Hi there! I want to change the post permalink schema on my WordPress 3.0-beta1 to use my new custom taxonomy. Today I can use /%category%/%postname%/ and the /my-category/my-post/ URL, that's nice but I need to use another taxonomy instead "category" one. I tried to use /%acervo%/%postname%/ but my URLs came with %acervo% on the URL instead the name of the "Acevo" (my taxonomy name) wich the post belongs to. I found something related to WP_Rewrite but without sucess...

    Read the article

  • How can I use wildcard urls with Code Igniter?

    - by tarnfeld
    I am building a system that has urls like app.com/login and app.com/dothing but it will also have app.com/xOldP. The web application is build using the latest version of Code Igniter and I was wondering if there was a way to add a check in, that if the url is a controller then do that and finish, but if not, do something else (which will check the url and if its not real 404, which I can do). I was wondering how annoying this would be :/ Some sample code or links would be great!

    Read the article

  • Rails / omitted from link_to?

    - by dannymcc
    Hi Everyone, I am using a Gem to communicate with FreeagentCentral via their API. I have the following code to display a link to the relevant freeagent project: <%= link_to "#{image_tag('/images/icons/Spinning Beach Ball.png')} Freeagent Project", "#{Freeagent::Base.site.to_s + Freeagent::Project.element_path(@kase.freeagent_id).gsub(/\A\//, '').gsub!(/.xml/,'')}" if @kase.freeagent_id %> The problem - There is a / omitted from the URL which makes the url like this: https://XXXXX.freeagentcentral.comprojects/12345 where it should be: https://XXXXX.freeagentcentral.com/projects/12345 This may be simple, but to me - it's driving me crazy! Thanks, Danny

    Read the article

  • ASP.NET MVC routing and paths is js files

    - by HiveHicks
    Hello, we're facing a problem now. We have a pretty big page with a loooong inline script, which does all the work. We now want to obfuscate it and use it as a separate .js file. But the problem is that we have paths which are generated by Url helper (Url.Content()). So what is the best way to separate js file from the page and not using hard-coded path strings?

    Read the article

  • iPhone SDK: Check validity of URLs with NSURL not working??

    - by Chris
    hi, I'm trying to check if a given URL is valid and i'm doing it like this: - (BOOL)urlIsValid:(NSString *)address { NSURL *testURL = [NSURL URLWithString:address]; if (testURL == nil) { return NO; } else { return YES; } } Since "URLWithString" is supposed to return "nil" if the URL is malformed I thought this would work but it doesn't for some reason. Could someone please tell me why? Thanks in advance!

    Read the article

  • PHP mysql - ...AND column='anything'... ?

    - by Nike
    Is there any way to check if a column is "anything"? The reason is that i have a searchfunction that get's an ID from the URL, and then it passes it through the sql algorithm and shows the result. But if that URL "function" (?) isn't filled in, it just searches for: ...AND column=''... and that doesn't return any results at all. I've tried using a "%", but that doesn't do anything. Any ideas?

    Read the article

  • Regex issue in rewriter config

    - by sgbinks
    I'm having an issue with bad requests from certain search parameters. An example URL: http://www.foo.com/washington/forums/search/%26 Results in a bad request. The rewriter config line looks like this: <rewrite url="^(.*)/forums/search/(.*)" to="~/Pages/Forums/Overview.aspx?Address=$1&amp;q=$2" processing="stop" /> I'm thinking it's an issue with the Regex...? Thanks in advance!

    Read the article

  • Can I suppress or enforce URLs to be prefaced with http:// in ALL browsers?

    - by Ryan Dunlap
    I want to ensure that regardless of what browser a user is in, they all see the EXACT same characters in the URL bar. Most browsers show the preceding protocol type in the URL bar. However, Chrome for example truncates http:// (not sure about https) and starts with the domain name, ie: Chrome: stackoverflow.com/questions/ask Safari: http://stackoverflow.com/questions/ask So, is there a way to either suppress the http:// in all browsers, or even enforce it in all browsers? Preferably suppress.

    Read the article

  • Parsing query strings in Java

    - by Will
    J2EE has ServletRequest.getParameterValues(). On non-EE platforms, URL.getQuery() simply returns a string. What's the normal way to properly parse the query string in a URL when not on J2EE?

    Read the article

  • I want the actual file name that is returned by a PHP script

    - by Aymon Fournier
    I am writing a python script that downloads a file given by a URL. Unfortuneatly the URL is in the form of a PHP script i.e. www.website.com/generatefilename.php?file=5233 If you visit the link in a browser, you are prompted to download the actual file and extension. I need to send this link to the downloader, but I can't send the downloader the PHP link. How would I get the full file name in a usable variable?

    Read the article

  • Address (url) forwarding with Vyatta

    - by Trikks
    Hi Got this kind of noob question i suppose. I got this very basic network setup and need help to set up some address forwarding. As seen in my illustration below all traffic enters via the eth0 interface (85.123.32.23). The external dns is setup to direct all hosts to this ip as well. Now, how on earth do I filter the incoming requests to each box? The Ip's are static! Se the network layout here: http://vyatta.org/files/u11160/setup.png I do not wish to solve this by assigning tons of ports etc. In my wishful thinking something like this would be nice :) set service nat rule 10 type destination set service nat rule 10 inbound-interface eth0 set service nat rule 10 destination address ftp.myhost.com set service nat rule 10 inside-address address 192.168.100.20 This way ALL traffic to the address ftp.myhost.com (at eth0) should be routed to the internal ip, 192.168.100.20. Right, is there anyone who could point in some direction? Maybe it's wrong to use nat? Please help me! :)

    Read the article

  • Address (url) forwarding with Vyatta

    - by Trikks
    Got this kind of noob question i suppose. I got this very basic network setup and need help to set up some address forwarding. As seen in my illustration below all traffic enters via the eth0 interface (85.123.32.23). The external dns is setup to direct all hosts to this ip as well. Now, how on earth do I filter the incoming requests to each box? The Ip's are static! My network layout: I do not wish to solve this by assigning tons of ports etc. In my wishful thinking something like this would be nice :) set service nat rule 10 type destination set service nat rule 10 inbound-interface eth0 set service nat rule 10 destination address ftp.myhost.com set service nat rule 10 inside-address address 192.168.100.20 This way ALL traffic to the address ftp.myhost.com (at eth0) should be routed to the internal ip, 192.168.100.20. Right, is there anyone who could point in some direction? Maybe it's wrong to use nat? Please help me! :)

    Read the article

  • Web log analyser with daily statistics per URL

    - by Mat
    Are there any good web server log analysis tools that can provide me with daily statistics on individual URLs? I guess I'm looking at something that can drill down into particular URLs and on particular days rather than just a monthly summary report. The following don't seem to meet my needs as they don't offer drilling down to get more detailed info: awstats analog webalizer (I'm running an nginx frontend into Apache with nginx outputting 'combined' format logfiles if it makes any difference.)

    Read the article

  • SSL URL gives a 404

    - by terrid25
    I have recently created an SSL cert on my server *.key and a *csr file. I then created the *crt and the *.ca-bundle with Comodo. I have 2 current vhosts: vhost for - http://www.example.com NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/home/example/public_html/example.com/httpdocs" ServerName example.com ServerAlias www.example.com </VirtualHost> vhost for https://www.example.com NameVirtualHost *:443 <VirtualHost *:443> SSLEngine on SSLCertificateFile /etc/ssl/certs/example_com.crt SSLCertificateKeyFile /etc/ssl/certs/server.key <Directory /home/example/public_html/example.com/httpdocs> AllowOverride All </Directory> DocumentRoot /home/example/public_html/example.com/httpdocs ServerName example.com </VirtualHost> The problem is, when I go to https://www.example.com I get a 404 I'm not sure if the vhost(s) is correct or why I get a 404. Has anyone ever seen this before? I have enabled mod_ssl and restarted apache Many Thanks

    Read the article

  • redirect from mysite.com to www.mysite.com

    - by jml
    hi there, i know that this has been answered many many times, so if someone wants to point me to another thread that answers my question specifically, that is fine... for right now, my searches aren't yielding many results. so i have a website like mysite.com that has a flash swf embedded in it and i go to www.mysite.com ... all of the sudden, things don't work properly. i would like to get to the bottom of this, because it's not like the page just "doesn't load" at all; it loads and i can only do certain things; as if certain functionality is disabled (might be url requests for specific urls etc). do i need to manage this in my control panel? i wouldn't assume so, because the site loads; just has a crippled functionality from within the swf. i was thinking it might have more to do with my crossdomain.xml file; could this be the case? thanks for any tips or suggestions.

    Read the article

  • URL Rewrite in WebLogic 11g

    - by A. Wilson
    I have a client running a WebLogic 11g install on a Windows Server machine who wishes to implement Apache-style mod_rewrite-like functionality to translate requests for easyurl.com to super.complicated.com/with/this/junk?here=and_more. I have scoured the Internet for advice, but all I can find are other people who are asking the same question and not getting any answer. Assuming that installing 3rd-party apps is not an option, how do I implement this in WebLogic? To clarify, WebLogic is not running with Apache (or else I'd just use mod_rewrite).

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >