Search Results

Search found 3190 results on 128 pages for 'isapi rewrite'.

Page 58/128 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Hidden features of mod_rewrite

    - by Owen
    There seem to be a decent number of mod_rewrite threads floating around lately with a bit of confusion over how certain aspects of it work. As a result I've compiled a few notes on common functionality, and perhaps a few annoying nuances. What other features / common issues have you run across using mod_rewrite?

    Read the article

  • Django AND .htaccess rewrites/redirects, is this possible?

    - by Infinity
    Is it possible to have Apache htaccess rewrites take effect before it hits django? For example so I can redirect iPhone users to a completely different domain without even hitting django. We're using apache2 with mod_wsgi and the apache vhost looks like this: <VirtualHost *:80> DocumentRoot /usr/local/www/site/static Alias /css/ /usr/local/www/site/static/css/ Alias /js/ /usr/local/www/site/static/js/ Alias /img/ /usr/local/www/site/static/img/ Alias /flash/ /usr/local/www/site/static/flash/ <Directory /usr/local/www/site/static> AllowOverride All Order allow,deny Allow from all </Directory> WSGIDaemonProcess mallorca-site threads=15 WSGIScriptAlias / /usr/local/www/site/config/dev/dev.wsgi </VirtualHost> Thanks

    Read the article

  • .tpl files and website problem

    - by whitstone86
    Apologies if the title is in lowercase but it's describing an extension format. I've started using Dwoo as my template engine for PHP, and am not sure how to convert my PHP files into .tpl templates. My site is similar to, but not the same as, http://library.digiguide.com/lib/programme/Medium-319648/Drama/ with its design (except colour scheme and site name are different, plus it's in PHP - so copyright issues are avoided here, the design arguably could be seen as parody even though the content is different. The database is called tvguide, and it has these tables: Programmes House M.D. Medium Police Stop! American Dad! The tablenames of the above programmes are: housemdonair mediumonair policestopair americandad1 Episodes The tablenames for the above programmes' episode guides are: housemdepidata mediumepidata policestopepidata americandad1epidata All of them have the following rows: id (not an auto-increment, since I wish to dynamically generate a page from this) episodename seriesnumber episodenumber episodesynopsis (the above four after id do exactly as stated) I have a pagination script that works, it displays 20 records per page as I want it to. This is called pmcPagination.php - but I won't post it in full since it would take up too much space. However, I'm trying to get it so that variables are filled in like this: (ok, so the examples below are ASP.NET, but if there's a PHP/MySQL equivalent I would gratefully appreciate this!!): http://library.digiguide.com/lib/episode/741168 http://library.digiguide.com/lib/episode/714829 with the episode detail and data. My site works, but it's fairly basic, and it's not online yet until my bugs are fixed. Mod_rewrite is enabled so my site reads as http://mytvguide.com/episode/123456 or http://mytvguide.com/programme/123456 http://mytvguide.com/WorldInAction/123456/Documentary/ I've tried looking on Google, but am not sure how to get this TV guide script to work at its best - but I think .tpl, and .php/MySQL is the way to go. Any advice anyone has on making this project into a fully workable, ready to use site would be much appreciated, I've spent months refining this project! P.S. Apologies for the length of this, hope it describes my project well.

    Read the article

  • Apache/PHP is determined to serve the wrong file

    - by Lucas
    I have a page that is called with a url like http://testserver/path/to/foo/bar/ but apache is serving the wrong file altogether. /path/to/ is a real directory where all the code and .htaccess file is. foo/bar/ is supposed to redirect to foo_bar.php with a RewriteRule, but it never gets there. It's not a mod_rewrite issue as I have commented out all the rules that could be interfering, which should give me 404s for that request, but the same problem occurs: the file that is served is /path/to/foo.php, so in it I var_dump $_SERVER and get: REQUEST_URI = /path/to/foo/bar/ SCRIPT_NAME = /path/to/foo.php SCRIPT_FILENAME = /real/path/to/foo.php PATH_INFO = /bar/ PATH_TRANSLATED = /real/bar/ PHP_SELF = /path/to/foo.php/bar/ Why is this request being routed to this file at all?

    Read the article

  • Can Apache configuration check cookies?

    - by nickf
    My situation: We have a mobile version of our website, and want to start redirecting mobile users to it. The plan is to do this in Apache httpd.conf or .htaccess, using something like this: RewriteEngine On RewriteCond %{HTTP_USER_AGENT} (iPhone|Blackberry|...) RewriteRule (.*) mobile/$1 However we want there to be a way for users to override our default action of redirecting them. One way we thought to do it was to show a link on the mobile site directing back to the regular site, and store a cookie when they use that link. Could the Apache configuration file check a cookie before redirecting? Is there a better way?

    Read the article

  • mod_rewrite to make a short URL

    - by Chris Stewart
    I have a url like: http://skepticalgamer.com/category/slam-the-controller I'd like to strip out "category" from the URL. So I'd want: http://skepticalgamer.com/slam-the-controller to act as if it were the original URL above. Is that something that can be done with mod_rewrite?

    Read the article

  • codeigniter problem with mod_rewrite on apache 1.3

    - by Shawn
    Anybody came into this before? Hosting a site on godaddy, the site is developed in codeigniter framework(php), to get pretty url, put this into .htacess RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] problem is only domain.com/index.php seems to work, other urls e.g domain.com/user/login won't work, codeigniter always returns '404 page'. Is there anything going on with godaddy's mod_rewrite or just their apache which as I know is version 1.3. Any clue? [update] a bit CI debug, found /system/libraries/Router.php line 239, line show_404( $segments[0] ); always gets invoded. $segments [ 0='index.php' ], that seems to be the problem, but why? All works on my dev box which is in apache2

    Read the article

  • RewriteCond and RewriteRule in .htaccess

    - by RD
    I have a client folder located at http://www.example.com/client However, I've now installed SSL on the server, and want to add a permanent redirect using HTACCESS so that whenever /client is accessed, that it redirects to: https://www.example.com/client Anybody know how to do that? I've redirected my domains in the past like this: RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^www.example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] This should not affect the solution, but the site must still redirect to www.example.com FIRST, and then to https://www.example.com/client if for example, http://www.example.co.za/client is entered.

    Read the article

  • apache mod_rewrite making permanent url problem

    - by Yc Zhang
    In file .htaccess <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^\/*get_post\/(.*)$ get_post.php?slug=$0 [L] </IfModule> If I type http://example.com/get_post/abcde, I get an empty array of $_GET variable. How can I achieve the effect like this: http://example.com/get_post?slug=abcde

    Read the article

  • 301 redirect, conflicting with RewriteRule

    - by user569711
    We did some maintenance today, and moved our web forums from /forums into the root folder of the domain. We put in a redirect 301 in a .htaccess file: Redirect 301 /forums/ http://www.ourforums.com/ However, we used to have some links that contained duplicate /forums folders. I.e. www.ourforums.com/forums/forums/forum.1 Obviously the redirect from above now leads to /forum.1, which odes not exist. I would like the old link to actually point to www.ourforums.com/boards/forum.1. I attempted to use something like: RewriteRule ^/forums/forums http://www.ourforums.com/boards/ [NC,R=301,L] Regardless of what I tried though, the Redirect seems to supersede any RewriteRules I put in the same file, regardless of whether I place them before the Redirect. Is there any way I can somehow ensure the RewriteRule is handled before the Redirect?

    Read the article

  • .htaccess causes links on page to try an open a BIN file?

    - by user1796820
    My friend's site which I agree to tech-advise, is psychtalkonline.com. You can go check it out, it's an anonymous forum (miniBBS) running Apache on Unix. I at first had a problem with mod_rewrite but then I uploaded the .htaccess file. However, that seemed to cause problems. If you click on any link, you will get a pop-up saying "You have chosen to open which is a BIN file". If you click the source code, and click on the links in the source code, you will see that it goes to the BIN file. I'm not really sure what's going on. I really would appreciate some help. Thanks.

    Read the article

  • htaccess not working as it should

    - by hsn
    well, ofcourse its not working, im still a n00b :) this is the code that i have : Options +FollowSymLinks RewriteEngine on RewriteRule (.*)\.css - [S=7] RewriteRule (.*)\.jpg - [S=6] RewriteRule ^gallery gallery.html [L] RewriteRule (.*)/(.*)/ index.html?page=$2 [L] RewriteRule (.*)/(.*) index.html?page=$2 [L] RewriteRule (.*)/ index.html?page=$1 [L] RewriteRule (.*) index.html?page=$1 [L,QSA] Now, this works fine, if i try localhost/abc but it wont work if i try localhost/abc/ also, when i try localhost/abc/def (or localhost/abc/def/ for that matter) the css file isnt being included properly. i get an error saying /abc/def/style.css does not exist. :( however, the code doesnt work if i remove the QSA flag from the last rule. this is the code that ive come up with after a lot of googling and reading SO. if anyone can help out i'll be extremely grateful. thanks!

    Read the article

  • How to use .htaccess to redirect to an url that includes a query parameter

    - by wbervoets
    Hi guys, I've been struggling with a redirect where the final URL includes a query parameter that is an URL. It seems htaccess is escaping some characters. Here is my htaccess: Code: RewriteRule ^mypath http s://www.otherserver.com/cookie?param1=123&redirectto=http://otherserver2.com/&param2=1 [L,R=302] First, if I put Code: http s://www.otherserver.com/cookie?param1=123&redirectto=http://otherserver2.com/&param2=1 in my browser address bar, www.otherserver.com will do its thing and then redirect to otherserver2 (including the &param2=1 which is a parameter of that URL and not of the URL otherserver.com) That's the behaviour I need :-) Now when I try to use the htaccess redirect from my site: http://mysite/mypath; the behaviour is not the same then putting the same URL in the browser address bar; it now tries to redirect to http ://otherserver2.com/ (no param2=1 anymore). (ps: otherserver1 and otherserver2 are not under my control.) I've tried escaping the redirectto parameter in my htaccess, like below, but it didn't work either: Code: http s://www.otherserver.com/cookie?param1=123&redirectto=http%3a%2f%otherserver2.com%2f%3fparam2%3d1 Because then my browser tries to go to httpotherserver.com (all special characters are gone) In the end I would like to see http ://mysite/mypath to show the contents of Code: http s://www.otherserver.com/cookie?param1=123&redirectto=http://otherserver2.com/&param2=1 (preferred solution) or do a redirect to that URL. I hope my message is not to confusing, I hope someone can help me out; as I've already spent hours on this :-)

    Read the article

  • cakephp alias url

    - by tecks
    Hi all, The url structure of my cakephp based site is mysite/cakephp/myapp/index.php/controller/action/input_paramaters I cannot remove index.php from my url, as I dont have access to httpd.conf file. Anyways, my question is that I just need to change the url of my homepage to something like http://mysite or mysite/myapp How would I do that? Thanks a lot!!

    Read the article

  • htaccess Rewriterule to make one query part of another

    - by Dan T
    I have a url /embed?t=X and I want to redirect it to /page/embed/X where X is any number of alpha numeric characters. I know must redirect rules go the other way but for the purpose of the applciation I need to reverse it. Any ideas? I have tried things like: RedirectRule ^embed\?t\=([a-zA-Z0-9]+)$ /page/embed/$1 but with no luck.

    Read the article

  • Mod_rewrite not working properly

    - by James P
    I have this in my .htaccess file... RewriteEngine on RewriteRule ^/invite$ /invite.html It's meant to let a user access this url: http://mysite.com/invite and display the invite.html page. I don't want to redirect the user, but just show them the invite.html page from a better looking URL. When I browse to http://mysite.com/invite though, I get a 404 not found error. Is there anything I'm doing wrong? I've tried looking at tutorials for using mod_rewrite but I seem to be doing what they're telling me too... Thanks!

    Read the article

  • Redirect additional domains to the single in use-domain using Apache mod_rewrite in .htaccess

    - by boobyWomack
    RewriteEngine On RewriteCond %{HTTP_HOST} ^someparkeddomain.com RewriteRule ^(.*)$ hxtp://www.thedomainUsed.co.uk/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www.someparkeddomain.com RewriteRule ^(.*)$ hxtp://www.thedomainUsed.co.uk/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^anotherparkeddomain.co.uk RewriteRule ^(.*)$ hxtp://www.thedomainUsed.co.uk/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www.anotherparkeddomain.co.uk RewriteRule ^(.*)$ hxtp://www.thedomainUsed.co.uk/$1 [R=301,L] is what I have but doesnt seem to do anything :/ (hxtp because I am new user not spammer!) redirect is working though as I use it for something else.

    Read the article

  • HTACCESS redirection with a word replacement in url

    - by Marwen
    I'm having trouble with this reg expression which i belive is correct, but it is not working. What im trying to do is redirect bunch of urls containing a specific string like this: http://www.example.com/**undesired-string**_another-string to http://www.example.com/**new-string**_another-string and http://www.example.com/folder/**undesired-string**/another-string to http://www.example.com/folder/**new-string**/another-string So i have this code in the .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule (.+)+(undesired-string)+(.+) $1new-string$2 [R=301,L] </IfModule> This should replace ANY undesired-string in any url to new-string, but it is not working, any idea why ? Thank you

    Read the article

  • .htaccess mod_rewrite subdomains

    - by Aaron
    .htaccess: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{HTTP_HOST} ^site\.com$ [NC] RewriteRule ^(.*)$ http://www.site.com/$1 [L,R=301] RewriteRule ^new/?$ index.php?section=new This works great and all, but I have recently implemented a subdomain m.site.com which reads off of a /mobile directory. When accessing m.site.com/new it will not display anything except return a server error. What can I do to correct this problem? Basically, I want http://m.site.com/new To achieve the same affect as http://www.site.com/new

    Read the article

  • Htaccess help, $1 being used before its set??? what?

    - by jiexi
    I have this snippet RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(index\.php|images|img|css|js|robots\.txt) RewriteRule (.*) index.php?/$1 [L] It won't allow me to access a file at website.com/js/main.php but it will let me access index.php According to my webhost, $1 is being called before it is set. Any solutions? I'll accept answers when i get back tomorrow. Thank you!

    Read the article

  • .htaccess trickery multi-language website

    - by user1658741
    I have a website right now that uses two languages (french and english) The way it works right now is that if someone goes to mysite.com/folder/file.php for example, file.php is simply a script that figures out which language to use, get's it's own path and filename(file.php) and serves up mysite.com/en/folder/file.php (if the language is english). However what shows up in the URL is still mysite.com/folder/file.php. For any folder and any file the same script is used. If I want to add a new file I have to add the file to the folder the user types into the browser as well to the en and fr folders. Could I do some .htaccess trickery so that whatever URL is typed, one .php file gets open that checks the language and what folder/file was requested and then serves up the correct language file? here's the php file that is served up for any files in the URL. <?php // Get current document path which is mirrored in the language folders $docpath = $_SERVER['PHP_SELF']; // Get current document name (Used when switching languages so that the same current page is shown when language is changed) $docname = GetDocName(); //call up lang.php which handles display of appropriate language webpage. //lang.php uses $docpath and $docname to give out the proper $langfile. //$docpath/$docname is mirrored in the /lang/en and /lang/fr folders $langfile = GetDocRoot()."/lang/lang.php"; include("$langfile"); //Call up the proper language file to display function GetDocRoot() { $temp = getenv("SCRIPT_NAME"); $localpath=realpath(basename(getenv("SCRIPT_NAME"))); $localpath=str_replace("\\","/",$localpath); $docroot=substr($localpath,0, strpos($localpath,$temp)); return $docroot; } function GetDocName() { $currentFile = $_SERVER["SCRIPT_NAME"]; $parts = Explode('/', $currentFile); $dn = $parts[count($parts) - 1]; return $dn; } ?>

    Read the article

  • getting error 500 with .htaccess when pointing an existing file / folder (mod_rewrite)

    - by Leto
    i made a simple .htaccess file to expose the problem. I want that all request made to the folder redirect to a subfolder file "app/index.php" RewriteEngine On RewriteRule (.*) app/index.php [QSA] And this works fine on with the basic url of my hoster (like http//myname.hosting.com/htaccessFolder The problem is that i have a domain pointing on this folder, and when accessed to it, server return Internal Server Error 500. If i do this : RewriteEngine On RewriteRule (.*) somefile.php [QSA] Redirection works only when file does not exists (404 not found error occured). when the file exists i get a 500 error too. I've asked the hosting support without success for the moment..

    Read the article

  • 301 Redirect. Need help. Having a hard time.

    - by Soma
    I'm trying to use mod_rewrite to redirect URLs and can't get anything to work. Here is what I'm hoping to do: Old URL: http://www.example.com/asp.pl?%5Fpuri=astore.amazon.com%2Fthegi02-20%2Fdetail%2FB0001L0DFA%2Fassid Needs to redirect to: www.example.com Anyone know of any way to do that?

    Read the article

  • Subdomain to folder htaccess

    - by mikelbring
    I am trying to point sub.domain.com to domain.com/app/*sub, but the farthest I can get is making it a redirection and I do not want it to redirect. Here is what I have, it works but it redirects it instead of staying on the subdomain, which is what I want. RewriteCond %{HTTP_HOST} ^(.*).example.com RewriteCond %{HTTP_HOST} !^www.example.com [NC] RewriteRule ^(.*)$ http://example.com/app/%1/$1 [L]

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >