Search Results

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

Page 55/128 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • RewriteCond to change displayed host, but not server

    - by coneybeare
    Typing out the title to this leads me to believe this might not be possible due to security concerns, but I will ask anyway. I have shortcode support running on my server, lets call it xx.yy I want it so when a user sends a request to xx.yy, it just changes the displayed host to another valid domain running on the same box. I have this so far (lets the server know to accept requests from xx.yy): RewriteCond %{HTTP_HOST} ^.*xx.yy [NC] RewriteRule ^/(.*)$ http://127.0.0.1:<PORT_OMITTED>%{REQUEST_URI} [P,QSA,L] RewriteCond %{HTTP_HOST} ^.*mysite.com [NC] RewriteRule ^/(.*)$ http://127.0.0.1:<PORT_OMITTED>%{REQUEST_URI} [P,QSA,L] It works, and it directs the traffic into my app, but the url says http://xx.yy when I would rather it say http://mysite.com I know i could redirect to http://mysite.com instead of 127.0.0.1, but I have 4 parallel boxes of mysite.com and going back out to DNS to maybe go to another box seems like a waste when I am already here. Also, I am not sure how POST requests would work like that. What can I do?

    Read the article

  • mod_rewrite rule to work with get method

    - by Davi
    I'm using this rule: RewriteRule ^(.*)$ public/$1 [L] and in public folder I use: $url = $_GET['url']; when I try to acess something on url using slash or it works fine and I get: /cities/display/45 => Array ( [0] => cities [1] => display [2] => 45) But when I try to submit a form, i'm not able to acces the data: /cities/?field1=value1&field2=value2 => Array ( [0] => cities) How can I solve this? I need a rule that also gets form's submited values Thanks

    Read the article

  • Include ":" character in parameter using Apache's mod_rewrite

    - by travis
    I use something like that to pass to the parameter 'text' what follows after the domain RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?text=$1 [L,QSA] So if I have www.example.com/tralala I get $text='tralala' But I want it to be possible to have in the parameter the character ":" multiple times: www.example.com/me:you:him Can you give me a hand? If I test www.example.com/me:you:him I get the error: Forbidden You don't have permission to access /you:me:him on this server.

    Read the article

  • Apache .htaccess: ErrorDocument and RewriteEngine not working together

    - by bogdanvursu
    Please take a look at the following .htaccess ErrorDocument 404 /404/ RewriteEngine On RewriteRule (.*) index.php [L] With this setup, I am using header('HTTP/1.1 404 Not Found'); in PHP to redirect to the error handling page and send the appropriate HTTP status code. The correct 404 status code is sent, but the browser shows a blank page and the access log shows "GET /invalid-url/ HTTP/1.1" 404 - Can anyone tell me how to make ErrorDocument work with Apache URL rewrites?

    Read the article

  • RewriteRule - take all urls with dash

    - by Qiao
    I need to redirect all urls with dash to a specific page. For example: site.com/this-url to site.com/page.php?url=this-url RewriteRule RewriteRule ^(.+-.+)$ page.php?url=$1 just hang http. No response. What is wrong and how it can be done?

    Read the article

  • using .htaccess to redirect from friendly url to actual file

    - by Kohalza
    I have the following RewriteRule in my .htaccess to redirect from a friendly url to my main application file: RewriteRule ^\/(.*).html$ home/www/page.php?p=$1 [L] This should send any url that points to a html page to page.php with the url as a parameter that will be parsed by the app. This works for urls that look like http://www.example.com/hello.html The problem is that I get a 404 error when the url contains a directory path, for example: http://www.example.com/category/hello.html The error reads: "File does not exist: /home/www/category" Seems it is first looking for the 'category' path instead of processing the .htaccess Any ideas how to solve this?

    Read the article

  • Exclude certain subfolders and domains in redirects

    - by Alexsander Akers
    This is a continuation from http://stackoverflow.com/questions/1704845/redirect-only-html-files How can I change my .htaccess to make it exclude certain subfolders or subdomains from the HTML-only redirect? I tried doing using this code to exclude the 'downloads' subfolder and the 'dev' and 'support' subdomains, but it didn't work: RewriteCond %{HTTP_HOST} ^pandamonia.us$ [OR] RewriteCond %{HTTP_HOST} ^www.pandamonia.us$ [OR] RewriteCond %{HTTP_HOST} !download [OR] RewriteCond %{HTTP_HOST} !faq RewriteCond %{HTTP_HOST} !support [OR] RewriteRule /.+\.html$ "http\:\/\/pandamonia\.us\/" [L]

    Read the article

  • How do I use .htaccess to redirect to a URL containing HTTP_HOST?

    - by Jon Cram
    Problem I need to redirect some short convenience URLs to longer actual URLs. The site in question uses a set of subdomains to identify a set of development or live versions. I would like the URL to which certain requests are redirected to include the HTTP_HOST such that I don't have to create a custom .htaccess file for each host. Host-specific Example (snipped from .htaccess file) Redirect /terms http://support.dev01.example.com/articles/terms/ This example works fine for the development version running at dev01.example.com. If I use the same line in the main .htaccess file for the development version running under dev02.example.com I'd end up being redirected to the wrong place. Ideal rule (not sure of the correct syntax) Redirect /terms http://support.{HTTP_HOST}/articles/terms/ This rule does not work and merely serves as an example of what I'd like to achieve. I could then use the exact same rule under many different hosts and get the correct result. Answers? Can this be done with mod_alias or does it require the more complex mod_rewrite? How can this be achieved using mod_alias or mod_rewrite? I'd prefer a mod_alias solution if possible. Clarifications I'm not staying on the same server. I'd like: http://example.com/terms/ - http://support.example.com/articles/terms/ https://secure.example.com/terms/ - http://support.example.com/articles/terms/ http://dev.example.com/terms/ - http://support.dev.example.com/articles/terms/ https://secure.dev.example.com/terms/ - http://support.dev.example.com/articles/terms/ I'd like to be able to use the same rule in the .htaccess file on both example.com and dev.example.com. In this situation I'd need to be able to refer to the HTTP_HOST as a variable rather than specifying it literally in the URL to which requests are redirected. I'll investigate the HTTP_HOST parameter as suggested but was hoping for a working example.

    Read the article

  • Mod_Rewrite: Testing URL got indexed in Google - How do I create a proper 301 redirect?

    - by Jonathan Wold
    I worked on a website for which I had a "development URL" that looked something like this: www.domainname.com.php5-9.dfw1-2.websitetestlink.com/ Now, several weeks after the website launch, there is at least one page of content indexed on Google with that URL. Question: How do I redirect all requests from that test URL to reroute to the actual domain? So, for instance, I would want: www.domainname.com.php5-9.dfw1-2.websitetestlink.com/page-name To go to: www.domainname.com/page-name The website is powered by WordPress and hosted on a PHP server. I've experimented with .htaccess without much success.

    Read the article

  • .htaccess redirect domain alias / parked domain

    - by Calua
    Hi... I have a .htaccess related question. For example, if I have two domain, a.com and b.com. All referring to one host (b.com is domain alias of a.com). I want visitor that visit a.com will be referred to url with www (http://www.a.com). As for the visitor of http://b.com will be referred to the www url (http://www.b.com). How can I do this with .htaccess?? Thanks, any help will be much appreciated :)

    Read the article

  • How to redirect multiple folders to the reflecting subdomain with .htaccess

    - by helmi
    Hi, i tried redirecting some folders to the subdomains with the same names as the folders. I tried this way but it didn't work: RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(test1|test2)(.*?)$ http://$1.domain.com$2 [R=301,L] I guess the problem is that the alternation of folders doesn't return a result that i can get into $1, right? I'm not a PCRE expert so andy help would be appreciated.

    Read the article

  • htaccess Redirect - First Segment to PHP File, Second Segment as Parameter

    - by Steve
    My htaccess redirect knowledge is somewhat weak, so I was hoping to get some help here. I currently have the following redirect, which works well: # remove trailing slash RewriteRule ^(.*)/$ /$1 [L,R=301] # redirect to clean URL RewriteCond /%{REQUEST_FILENAME}.php -f RewriteRule ^([a-zA-Z0-9_-\s]+)$ /$1.php This takes a URL like www.mysite.com/about to www.mysite.com/about.php Now I would like to keep this behavior, but add parameters (if applicable), as such: www.mysite.com/about = www.mysite.com/about.php www.mysite.com/gallery/1 = www.mysite.com/gallery.php?id=1 If possible, I might like to expand this system to 2 or more parameters, as such: www.mysite.com/gallery/1/2 = www.mysite.com/gallery.php?id=1&section=2 So the pattern would be: First URL segment redirects to a PHP file (Optionally) the second segment gets added as the id parameter (Optionally) the third segment gets added as the section parameter

    Read the article

  • Redirect for .htaccess Wildcard Subdomains

    - by waywardspooky
    Hello, I've been trying to figure out a way to redirect requests for wildcard subdomains to a specific folder ( called 'core' ) and calling the requested page/file from that specific folder. For example, making all calls to -http://johnny5.mysite.net redirect to -http://mysite.net/core/, or -http://docholliday.mysite.net/login.php redirect to -http://mysite.net/core/login.php, or a final example, -http://jamesbrown.mysite.net/images/feelgood.jpg to -http://mysite.net/core/images/feelgood.jpg. The problem I've been having has been getting the redirect to call the requested page/file from 'core'. I've been able to get the wildcard subdomains to redirect requested pages/files to the root ( -http://mysite.net ), but not to the specific folder ( -http://mysite.net/core/ ). Here's what I have: Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^(www|mail|ftp)\.[a-z-]+\.[a-z]{2,6} [NC] RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC] RewriteRule ^/(.*)$ http://%1/core/$1 [L] I've tried several things like removing the http://%1 in the RewriteRule but I can't seem to get it to work in the way I described above.

    Read the article

  • Use symfony 1.4 without changing apache configuration

    - by aRagnis
    Is it possible to set the /web directory as webroot whithout changing apache configuration file? I tried using the following .htaccess code, but if i go to localhost/module/, it displays 404 error. But if i go to localhost/web/module/ then everything works. <IfModule mod_rewrite.c> RewriteEngine on RewriteRule sf/(.*) lib/vendor/symfony/data/web/sf/$1 [L] RewriteRule ^$ web/ [L] RewriteRule (.*) web/$1 [L] </IfModule>

    Read the article

  • Locking down multiple sites in Sitecore

    - by adam
    Hi I have two sites running under one Sitecore 6 installation. The home nodes of the sites are as such: /sitecore/content/Home /sitecore/content/Careers Assuming the primary site is at domain.com, the careers site can be accessed at careers.domain.com. My problem is that, by prefixing the uri with /sitecore/content/, any sitecore item can be accessed by either (sub)domain. For example, I can get to: http://domain.com/sitecore/content/careers.aspx (should be under careers.domain.com) http://careers.domain.com/sitecore/content/home/destinations.aspx (should be under domain.com). I know I can redirect these urls (using IIS7 Redirects or ISAPIRewrite) but is there any way to 'lock' Sitecore down to only serve items under the configured home node for that domain? Thanks, Adam

    Read the article

  • .htaccess newb - RewriteRule not matching 2nd rule, why?

    - by jyoseph
    I am currently migrating from isapi_rewrite to .htaccess. I'm having some difficulty and I think it's something basic, but I'm not terribly familiar with .htaccess. I have the two rules like so: RewriteRule ^testing/ /test/index.html?test=1 [NC] RewriteRule ^testing/foo-bar/ /test/index.html?test=2 [NC] Yet the second rule never matches. If I go to http://mydomain.com/testing/foo-bar/ then I will only see the first rule. Why is that? And can it be easily fixed? I have many rules (outputted from the database to write the .htaccess file )and ordering them in a particular order isn't really possible.

    Read the article

  • non www .htaccess redirect - ignore other subdomains.

    - by qxxx
    Hi, I have a .htaccess redirect for "non www" like this: RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] it is working. But, i have also some subdomains other than www. If I call for example http://shop.example.com it redirects me to: http://www.shop.example.com I dont want to write the subdomains into the .htaccess file, it should work automatically, just ignore anything else than www and '' like this: if subdomain =='' -> redirect to www.HTTP_HOST.... elseif subdomain !='' && subdomain !='www' -> do nothing. thanks!

    Read the article

  • .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

  • What Am I Doing Wrong on this HTACCESS file!

    - by Ronnie Chester Lynwood
    Someone please tell me what is wrong with this htaccess rules? RewriteCond %{QUERY_STRING} ^q=(.*)&type=downway1$ [NC] RewriteRule ^search\.php$ /search\/%1\/1\/? [R=301,NC,L] RewriteCond %{QUERY_STRING} ^q=(.*)&type=(.*)$ [NC] RewriteRule ^search\.php$ /search\/%1\/%2\/1\/? [R=301,NC,L] RewriteRule search/(.*)/(.*)/$ /search.php?q=$1&page=$2 [L] <-- this and RewriteRule search/(.*)/(.*)/(.*)/$ /search.php?q=$1&type=$2&page=$3 [L] <-- this are not working in same time. for example TYPE = app Q = windows if I search type by downway1 it works powerfully but if I search in app type Q becomes windows/app not only windows. help me please!

    Read the article

  • Redirect question using mod_rewrite (no extensions - root of site)

    - by alex
    Hi, I'm having a small problem with mod_rewrite I have the following in my .htacces: Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+)\.htm$ index.php?name=$1 [NC] This is my index.php file: <?php echo $_GET['name]; ?> This works great for the following url: www.mySite.com/this is an example.htm this would display "this is an example" What i'm trying to do however, is get it to do the same, without the .htm extension: for example: www.mySite.com/this is an example Any ideas? (dont think it's relevant but i'm using xampp to test this)

    Read the article

  • 503 server response for Googlebot

    - by Hallik
    I put an .htaccess file in my webroot with the following contents RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^.*(Googlebot|Googlebot|Mediapartners|Adsbot|Feedfetcher)-?(Google|Image)? [NC] RewriteRule .* /var/www/503.html This website is in maintenance mode, and I don't want anything indexed yet. I tested the code with a firefox User-Agent switcher plugin, and looking at the access log it shows this at the end of each log entry, but watching in TamperData or Firebug, it still returns a 200 server response instead of a 503. What am I doing wrong? "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" contents of /var/www/503.html <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>503 - Service temporary unavailable</title> </head> <body> <h1>503 - Service temporary unavailable</h1> <p>Sorry, this website is currently down for maintainance please retry later</p> </body> </html> I get this in my error log. LogLevel debug, would that go into the vhost in a specific place? Every answer I see on google is something different. Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

    Read the article

  • CakePHP 2.0+ Setup on online shared hosting

    - by gutigrewal
    1 and I've uploaded all the files onto the file server that I am using 000webhost.com however Im having a few problems with the modrewrite I keep getting re-directed to http://error404.000webhost.com/? Does anyone know how to setup cakephp 2.1 on a shared area?? Im getting this error now: Fatal error: Call to undefined function pluginsplit() in /home/a4300629/public_html/lib/Cake/Cache/Cache.php on line 151 not really sure how this error has come about, any ideas? Thanks in advance.

    Read the article

  • Mod_rewrite and redirects with training forward slash not working

    - by john williams
    I'm using the following lines of code in my .htaccess file to create redirects. The problem is, whenever I go to example.com/register/ it cant find the css files because it's looking for example.com/register/mycss.css instead of example.com/mycss.css. Redirect 301 register.php http://example.com/register RewriteRule ^register/?$ register.php How can I correct this? I'm new to any kind of htaccess/mod_rewrite functions so feel free to point me in the right direction if there are any other flaws.

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >