Search Results

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

Page 124/1156 | < Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >

  • .htaccess more than one command in the file

    - by Stefan
    Hey I have an .htaccess file with the following code: <Files ~ "item|profile|category|search"> ForceType application/x-httpd-php </Files> What I want is to add a re-write rule as well which changes any body who navigates to the site to use http://www.domain.com sintead of http://domain.com I have the code: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ http://www.DOMAIN.com/$1 [R,L] however I can't seem to just place in the file as it corrupts? Or just doesn't work... I wish I knew more about .htaccess files How can I add this in? Thanks, Stefan

    Read the article

  • django dynamically deduce SITE_ID according to the domain

    - by dcrodjer
    I am trying to develop a site which will render multiple customized sites according to the domain name (subdomain to be more precise). My all the domain names are redirected to the So for each site there will be a corresponding model which defines how the site should look (SITE - SITE_SETTINGS) What will be the best way to utilize the django sites framework to get the SITE_ID of the current site from the domain name instead of hard-coding it in the settings files (django sites documentation) and run database queries, render the views accordingly? If using multiple settings file is my only option can this (wsgi script handle domain name) be done? Update So finally, following lukes answer, what I will do is define a custom middleware which makes the views available with the important vars required according to the domain. And as far as sitemaps and comments is concerned, I will have to customize sitemaps app and a custom sites model on which the other models of sites will be based. And since the comments system is based on the hard-coded sitemap ID I can use it just as is on the models (models will already be filtered according to the site based on my sites framework) though the permalink feature will have to be customized. So a lot of customization. Please suggest if I am going wrong anywhere in this because I have to ensure that the features of the project are optimized. Thanks!

    Read the article

  • Using .htaccess to force https on all requests in Zend MVC

    - by davykiash
    I have been battling with .htaccess to get all the requests to use https on my Zend MVC. What am seeing is that SSL turns "on" and then goes "off" as the page loads. Below is my .htaccess file. SetEnv APPLICATION_ENV production RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} What do I need to adjust to get my https working properly?

    Read the article

  • Why should I use "Web 2.0"-style URLs?

    - by hydrapheetz
    In short, why use something like http://stackoverflow.com/badges/6/supporter instead of something "simpler" (and subjectively, at that) like http://stackoverflow.com/badges/6/. Even on my own site I've just been using /post/6/ to reference posts (by IDs, even though I still store a slug.) Instead of /post/6/small-rant-on-urls, and in some cases, they can get even more absurd, much more so than is really necessary.

    Read the article

  • codeigniter broken link

    - by jaypee
    hi guys, im new in codeigniter. i have a project running perfectly in my localhost. when i deployed, my links seem to be broken. e.g. mysite.com displays the homepage without any error. now, i have a link let's say an about us link e.g. mysite.com/main/about where main is my controller and about is my function. the problem is the about us link is broken e.g. "Oops! This link appears to be broken." do you have any idea where did i go wrong? thank you for any positive response.

    Read the article

  • Why do I get HTTP Code 414 on one network but not another?

    - by Stephen Darlington
    I have an otherwise working iPhone program. A recent change means that it generates some very long URLs (over 4000 characters sometimes) which I know isn't a great idea and I know how to fix -- that's not what I'm asking here. The curious thing is that when I make the connection using a 3G network (Vodafone UK) I get this HTTP "414 Request-URI Too Long" error but when I connect using my local WiFi connection it works just fine. Why would I get different results using different types of network? Could they be routing requests to different servers depending on where the connection originates? Or is there something else at stake here? The corollary questions relate to how common this is. Is it likely to happen whenever I use a cell network or just some networks?

    Read the article

  • Redirect based on Accept-Language

    - by Anthony Faull
    I need to honor the web browser's list of language preferences. Supported languages are English and French. For example: http_accept_language="jp-JP;fr;en-US;en" redirects to a directory called /French/. How can I do this with rewrite rules in my .htaccess file?

    Read the article

  • How do I redirect a FQDN to an internal URL?

    - by Dave
    We have internal DNS servers where we've registered a FQDN that resolves internally to identityreg.domain.com. We also have an existing web page at https://iamserver.domain.com/product/default.asp?Workflow=process1. We need our users to be redirected to the existing web page URL whenever they type identityreg.domain.com. We're using IIS for the web server. I'm a newbie here so forgive any misuse of terms. How do I get the FQDN to redirect to the URL?

    Read the article

  • Rewrite Mod issue

    - by Caro Fiedler
    I have the follow code: if (isset($_GET['preis']) && $_GET['preis']==="0-100-euro"){ $preis = "WHERE preis >= 0 and preis <= 100"; } elseif (isset($_GET['preis']) && $_GET['preis']==="100-200-euro"){ $preis = "WHERE preis >= 100 and preis <= 200"; } elseif (isset($_GET['preis']) && $_GET['preis']==="200-300-euro"){ $preis = "WHERE preis >= 200 and preis <= 300"; } elseif (isset($_GET['preis']) && $_GET['preis']==="300-500-euro"){ $preis = "WHERE preis >= 300 and preis <= 500"; } else { } $abfrage = "SELECT * FROM outfits $preis LIMIT $start, $eintraege_pro_seite"; $ergebnis = mysql_query($abfrage); example.com/?preis=100-200-euro works but example.com/preis-100-200-euro/ is not This is my htaccess: RewriteEngine On RewriteRule ^preis-([^-]*)/seite-([^-]*)/$ ?preis=$1&seite=$2 [L] RewriteRule ^preis-([^-]*)/$ ?preis=$1 [L] RewriteRule ^seite-([^-]*)/$ ?seite=$1 [L] I use the same rules for many other links and it works fine, but only in this case not

    Read the article

  • EPM 11.1.2 - Receive Anonymous Level Security token message in IE8 when trying to access Shared Services or Workspace URL

    - by Ahmed A
    If you get "Receive Anonymous Level Security token" message in IE8 when trying to access Shared Services or Workspace URL.Workaround:a. Go to Start > Run and enter dcomcnfgb. Expand Component Services, Expand Computers and right click on My Computer and select Propertiesc. Click on the Default Properties tab.  Change the Default Authentication Level to Connect.  Click apply and then OK.d. Launch the IE browser again and you will be able to access the URL.

    Read the article

  • How do I remove only some values of a URL parameter in Google Analytics?

    - by Iain Hallam
    I'm using Google Analytics on a DokuWiki site, which uses a URL parameter to decide what to do with the current page: /page is equivalent to: /page?do=show 1) I want to see some of these "modes", but mostly I'd like them counted as viewing the bare page URL itself. The following are the only ones I want to see separately: /page?do=login /page?do=backlinks /page?do=revisions /page?do=subscribe How do I collapse the unwanted modes to the page itself (/page)? 2) Some modes do something that should really not have a page attached, such as: /page1?do=sitemap /page2?do=sitemap How do I get these to show up without the page part (/?do=sitemap)? 3) What do I do with the search mode? Can I remove the page part from this too, and still find out which page people used the search function on? /page?do=search&id=query+text

    Read the article

  • POST request from Python to PHP

    - by RainbowHat
    Python params = urllib.parse.urlencode({'spam': '1', 'eggs': '2', 'bacon': '3'}) binary_data = params.encode('utf-8') reg = urllib.request.Request("http://www.abc.com/abc/smart/ap/request/",binary_data) reg.add_header('Content-Type','application/x-www-form-urlencoded') f = urllib.request.urlopen(reg) print(f.read()) PHP if($_SERVER['REQUEST_METHOD'] == 'POST') { //parse_str($_SERVER['QUERY_STRING']); var_dump($_SERVER['QUERY_STRING']); } When i try print binary_data , it does show the parameter but by the time it reaches the PHP , i see nothing. Any idea?

    Read the article

  • How to use a rewrite rule to force calls for "domain.tld/subdir/file.html" to show as "subdir.domain.tld/file.html"?

    - by Wion
    Hi! First time poster. Very new to mod_rewrite. I'm on a shared server and the context of this problem is with a virtual directory under my root account. The domain (domain.tld) will have subdirectories representing annual mini-sites of static .html files. Subdirectory names (yyyy) will be the 4-digit year (e.g., "2010"). I want any call to domain.tld/yyyy/file.html to appear as yyyy.domain.tld/file.html in the browser address bar, and (of course) for the page to load properly. I already force dropping “www” by using… RewriteCond %{HTTP_HOST} ^www\.domain\.tld [NC] RewriteRule (.*) http://domain.tld/$1 [R=301,L] So far so good. But no matter what I try after that, I can’t get the subdomain to force to the front of the domain. Here’s one of the more complicated examples I’ve tried (no doubt wrong)… RewriteCond %{HTTP_HOST} ^domain\.tld/([0-9]+)/([a-z-]+)\.html [NC] RewriteRule (.*) %1.domain.tld/%2.html [NC] This doesn’t break anything (that I can tell), but it doesn’t do what I want either. I.e., if I type yyyy.domain.tld, I’ll see yyyy.domain.tld in the address bar, and navigating around will give me yyyy.domain.tld/file.html, etc. Fine. But if also type domain.tld/yyyy I’ll see domain.tld/yyyy, etc, which is not how I want people to see it. It doesn’t redirect or mask or alias or whatever you call it. Is it even possible to force one look over the other like that? Should I be handling this with DNS instead? Thanks in advance!

    Read the article

  • Sending variables in URLs in PHP with echo

    - by alexpelan
    Hi all, I can't really find good guidelines through google searches of the proper way to escape variables in URLs. Basically I am printing out a bunch of results from a mysql query in a table and I want one of the entries in each row to be a link to that result's page. I think this is easy, that I'm just missing a apostrophe or backslash somewhere, but I can't figure it out. Here's the line that's causing the error: echo "<a href = \"movies.php/?movie_id='$row['movie_id']'\"> Who Owns It? </a> "; and this is the error I'm getting: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING If you could elaborate in your answers about general guidelines for working with echo and variables in urls, that would be great. Thanks.

    Read the article

  • Does UrlDecode handle plus (+) correctly?

    - by harpo
    According to RFC 2396, The plus "+", dollar "$", and comma "," characters have been added to those in the "reserved" set, since they are treated as reserved within the query component. Indeed, search this site for "plus + comma , dollar $", and you get http://stackoverflow.com/search?q=plus+%2B+comma+,+dollar+$ Plus is only encoded (by the application) when it's not being used as a delimiter. But as others have observed, .NET's UrlDecode function converts plus to space. Where is this behavior specified?

    Read the article

  • How to use rails routes in external classes?

    - by wesgarrison
    I'm using prawn to generate pdfs, set up ala http://wiki.github.com/sandal/prawn/using-prawn-in-rails I'd like to access my routes so I can generate links in my pdfs, but now I'm not in a template like I used to do with prawnto, so I don't have access to the named routes. class MyPdf < Prawn::Document def to_pdf text root_path end end How can I include my named routes?

    Read the article

  • Mod Rewrite - Simple Question

    - by bob
    This is my current .htaccess Options +FollowSymLinks DirectoryIndex index.php RewriteEngine On RewriteBase /product/ RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule ^(.+)\.php$ ./$1/ [R=301,L] RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L] RewriteRule ^contact/?$ ./contact.php [QSA,L] Everything is working fine now.. /product/contact return to /product/contact/ /product/contact.php return to /product/contact/ Question.. How to make all my .php will be /contact/ /help/ /faq/ Now I should to add contact.php help.php faq.php to the htaccess I tried to add RewriteRule ^(.*)/$ $1.php [QSA,L] but it will be return loop. Let me know how to fix it ;)

    Read the article

  • Routing problem, handling differently online versus local - MVC.net 1.0

    - by VinnyG
    I have there lines in my RegisterToutes : routes.MapRoute("Pages3", "{url1}/{url2}/{url3}", MVC.Page.RedirectTo(), new { url1 = "", url2 = "", url3 = "" }); routes.MapRoute("Pages2", "{url1}/{url2}", MVC.Page.RedirectTo(), new { url1 = "", url2 = "", url3 = "" }); routes.MapRoute("Pages1", "{url1}", MVC.Page.RedirectTo(), new { url1 = "", url2 = "", url3 = "" }); On my local machine and on my demo server (demo.myserver.com/myproject/) it works great for handling the 404, but live(www.mysite.com) it just go to the IIS 404. I have a PageController witch go see if the page exist in the DB and if it don't I return to a 404 view with the status code 404 (Response.StatusCode = 404;) How can I reproduce the same behavior live? Do I need to setup something on IIS? I'm on winserver 2008 using c# and MVC 1.0. Thanks for the help!

    Read the article

  • BleachBit: How to Completely Clear URL History in Firefox?

    - by tSquirrel
    14.04 / Firefox 29.0 I've been using Bleachbit to clear usage/file history, and for the most part it works great. However, it doesn't seem to clear the website hostnames out of the URL, at all. These addresses are not bookmarked. Also, the total URL isn't preserved, just the hostname. Visit site http://www.bluesnews.com/some_random_URL_string Exit Firefox Run Bleachbit, with ALL Firefox options selected Restart Firefox Check history: completely empty, other than bookmarked sites. www.bluesnews is NOT bookmarked Type "blue" which is Firefox automatically completes as "http://www.bluesnews.com/" Alternate Step #3: Use Firefox's built-in "Clear History" and select ALL entries with a time frame of "Everything". Same result as above. My inquiry in BB forums hasn't been responded to. I found Dan's proposed solution, however changing autocomplete in about:config only turns off the function, it doesn't actually stop storing URLs.

    Read the article

  • How can I use javascript to convert relative href attributes into absolute paths?

    - by jhensley2
    I have a template that gets screenscraped from an outside vendor and need to include absolute paths in the navigation so the externally hosted content will properly link back to our site. Right now the page/template is driven by a global menu app written by our back end development staff... so anyone who updates our site goes in and changes the menus and their paths... Right now all of the links are linking to relative paths back to the root. For example <a href="/">Home</a> <a href="/news/">News</a> <a href="/media/">Media</a> <a href="/other/">Other</a> I need a simple way (preferably with jquery) to prepend "http://www.domain.com" to each of those links.

    Read the article

  • Mod rewrite urls with

    - by Andrew
    Hey Guys, I'm at my wits end here , I normally like to work things out on my own but this has me well and truly beaten here.. I'm trying to mod rewrite my urls that contain pluses... /search.php?q=can+be+any+length to /can-be-any-length.html Any help would be really appreciated becaus rewriting the + php is not an option

    Read the article

  • How to create a fully qualified hyperlink to a resource dynamically?

    - by Slauma
    In ASP.NET I'd like to create a link which points to a specific Uri and send this link in an email to a user, for instance something like http://www.BlaBla.com/CustomerPortal/Order/9876. I can create the second part of the Uri /CustomerPortal/Order/9876 dynamically in code-behind. My question is: How can I create the base Uri http://www.BlaBla.com without hardcoding it in my application? Basically I want to have something like: http://localhost:1234/CustomerPortal/Order/9876 (on my development machine) http://testserver/CustomerPortal/Order/9876 (on an internal test server) http://www.BlaBla.com/CustomerPortal/Order/9876 (on the production server) So is there a way to ask the server where the application is running: "Please tell me the base Uri of the application" ? Or any other way? Thank you in advance!

    Read the article

< Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >