Search Results

Search found 682 results on 28 pages for 'nc'.

Page 21/28 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Memcache textual protocol cheatsheet ?

    - by Maxim Veksler
    Memcached interface is implemented using a textual protocol. Sometimes it's very useful to be to fetch data stored on your remote server simply by invoking netcat with some shell kung fu, for example: To download the XML result of your nightly data crunching job you might run something like: echo "get 95ec6c7693ec53771c8a3fb1061562b8" | nc localhost 11211 > console_overview_06_04_2010.xml The interesting part here is get SOME_UNIQUE_KEY which is part of the memcached protocol. What other useful usages can you suggest in regard to the ability to interact with memcached using nothing more then command line tools? Thank you, Maxim.

    Read the article

  • Drupal Migration Problem

    - by Gok Demir
    After migrating my Drupal (6.16) installation from shared hosting to Linode VPS (Ubunto 10.04 32 bit). Whenever I click a URL it shows only the homepage. I put ?q=user at the end of the URL to login as an admin. When I logged in it is the same. I couldn't navigate to any URL. It shows only homepage. I forgot to clean Drupal cache before migration. Is it because of this? I couldn't navigate to Administer Site configuration Performance to clean cache, nothing works. By the way .htaccess Rewrite on enabled as shown below. apache2 apache2-doc apache2-utils libapache2-mod-php5 php5 php-pear php5-xcache php5-suhosin php5-mysql packages are installed. What can I do? # # Apache/PHP/Drupal settings: # # Protect files and directories from prying eyes. <FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$"> Order allow,deny </FilesMatch> # Don't show directory listings for URLs which map to a directory. Options -Indexes # Follow symbolic links in this directory. Options +FollowSymLinks # Make Drupal handle any 404 errors. ErrorDocument 404 /index.php # Force simple error message for requests for non-existent favicon.ico. <Files favicon.ico> # There is no end quote below, for compatibility with Apache 1.3. ErrorDocument 404 "The requested file favicon.ico was not found. </Files> # Set the default handler. DirectoryIndex index.php # Override PHP settings. More in sites/default/settings.php # but the following cannot be changed at runtime. # PHP 4, Apache 1. <IfModule mod_php4.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 </IfModule> # PHP 4, Apache 2. <IfModule sapi_apache2.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 </IfModule> # PHP 5, Apache 1 and 2. <IfModule mod_php5.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 </IfModule> # Requires mod_expires to be enabled. <IfModule mod_expires.c> # Enable expirations. ExpiresActive On # Cache all files for 2 weeks after access (A). ExpiresDefault A1209600 <FilesMatch \.php$> # Do not allow PHP scripts to be cached unless they explicitly send cache # headers themselves. Otherwise all scripts would have to overwrite the # headers set by mod_expires if they want another caching behavior. This may # fail if an error occurs early in the bootstrap process, and it may cause # problems if a non-Drupal PHP file is installed in a subdirectory. ExpiresActive Off </FilesMatch> </IfModule> # Various rewrite rules. <IfModule mod_rewrite.c> RewriteEngine on # If your site can be accessed both with and without the 'www.' prefix, you # can use one of the following settings to redirect users to your preferred # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: # # To redirect all users to access the site WITH the 'www.' prefix, # (http://example.com/... will be redirected to http://www.example.com/...) # adapt and uncomment the following: # RewriteCond %{HTTP_HOST} ^example\.com$ [NC] # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] # # To redirect all users to access the site WITHOUT the 'www.' prefix, # (http://www.example.com/... will be redirected to http://example.com/...) # uncomment and adapt the following: # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] # Modify the RewriteBase if you are using Drupal in a subdirectory or in a # VirtualDocumentRoot and the rewrite rules are not working properly. # For example if your site is at http://example.com/drupal uncomment and # modify the following line: # RewriteBase /drupal # # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: # RewriteBase / # Rewrite URLs of the form 'x' to the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </IfModule>

    Read the article

  • Weak linking on iPhone refuses to work

    - by Jonathan Grynspan
    I've got an iPhone app that's mainly targetting 3.0, but which takes advantage of newer APIs when they're available. Code goes something like this: if (UIApplicationDidEnterBackgroundNotification != NULL) [nc addObserver: self selector: @selector(irrelelvantCallbackName:) name: UIApplicationDidEnterBackgroundNotification object: nil]; Now, according to everything Apple's ever said, if the relevant APIs are weakly linked, that will work fine because the dynamic linker will evaluate UIApplicationDidEnterBackgroundNotification to NULL. Except that it doesn't. The application compiles, but as soon as it hits "if (UIApplicationDidEnterBackgroundNotification != NULL)" it crashes with EXC_BAD_ACCESS. Is this simply a matter of a compiler flag I need to set? Or am I going about this the wrong way?

    Read the article

  • Use mod_rewrite to redirect from example.com/dir to www.example.com/dir

    - by kavoir.com
    Assume / is the document root of my domain example.com. /.htaccess RewriteEngine on RewriteCond %{HTTP_HOST} ^golfcoursesd\.com$ [NC] RewriteRule ^(.*)$ http://www.golfcoursesd.com/$1 [R=301,L] /dir/.htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /dir/index.php [L] </IfModule> I know how to redirect example.com/dir to www.example.com/dir, because /.htaccess does the very job. However, the trick here is that I have to keep /dir/.htaccess to serve up virtual directories (such as /dir/state/AK/35827/ which aren't actual directories) if you know what I mean. Problem is, if I keep /dir/.htaccess, a request of: http://example.com/dir/state/AK/35827/ DOES NOT redirect to: http://www.example.com/dir/state/AK/35827/ as would: http://example.com/ redirect to: http://www.example.com/ Not sure if I made it clear. Basically, how to make http://example.com/dir/state/AK/35827/ correctly redirect to http://www.example.com/dir/state/AK/35827/ AND I can serve virtual URLs?

    Read the article

  • htaccess rule redirect non www to www - litespeed server

    - by webdev28
    I have a question about using htaccess in my litespeed server. I tried to redirect http://domain.com to http://www.domain.com using this rule: Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule .* http://www.domain.com/ [L,R=301] When I check http://domain.com using Xenu, the result is as follow: http://domain.com/ 200 ok text/html 301 Moved Permanently http://domain.com/%s 200 ok text/html 301 Moved Permanently http://www.litespeedtech.com/ 200 ok text/html LiteSpeed Web Server http://www.domain.com/ 200 ok text/html redir I wonder whether I had incorrect htaccess rule or this is because of bug in litespeed? I have searched anywhere for hours...Thanks

    Read the article

  • Rewrite URL with .htaccess

    - by Joaquin McCoy
    Hi guys, I've this url: http://www.test.com/page.php?k=m1ns and I want this one: http://www.test.com/r/m1ns My .htaccess: Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^k/([^/\.]+)/?$ page.php?k=$1 [L] # force www. in all requests RewriteCond %{HTTP_HOST} ^test\.com [NC] RewriteRule ^(.*)$ http://www.test.com/$1 [L,R=301] # enable hiding php extension RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php But it doesn't work. Only the non-www - www and hiding php rules works. If I put http://www.test.com/page.php?k=m1ns does not rewrite. Anyone knows why? Thanks.

    Read the article

  • Redirect subdomain to subdomain on new domain

    - by Ali
    Hello, I own 2 domains sio-india.org and sio-india.com What i want to do is redirect all the subdomains from 1st domain to 2nd domain. eg. home.sio-india.org to home.sio-india.com but i dont want to redirect sio-india.org to sio-india.com and also dont want to redirect www.sio-india.org to www.sio-india.com Please help I am using this code in htaccess but it is not working. RewriteCond %{HTTP_HOST} ^(.*)sio-india\.org$ [NC] RewriteRule ^(.*)$ http://%1sio-india.com/$1 [R=301,L] Please hepl me I am stuck.

    Read the article

  • joomla .htaccess file rewrite rule explanation required

    - by Vivek Chandraprakash
    Hi, I'm trying to understand the following lines in joomla's .htaccess file. Can someone explain this please #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond %{REQUEST_URI} !^/index.php #RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC] #RewriteRule (.*) index.php #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] I want to do some custom redirects for example if a url is like this example.com/subdirectory1 i want to redirect to some article. tried adding this line in the .htaccess file RewriteRule ^somepath index.php?option=com_content&view=article&id=1&Itemid=12 but for some reason the article shows the title even though it's not supposed to show. when i access using the long url string the title doesn't appear if i rewrite it appears. Please help. -Vivek

    Read the article

  • Saving CSV in cocoa

    - by happyCoding25
    Hello, I need to make a cvs file in cocoa. To see how to set it up I created one in Numbers and opened it with text edit it looked like this: Results,,,,,,,,,,,, ,,,,,,,,,,,, A,10,,,,,,,,,,, B,10,,,,,,,,,,, C,10,,,,,,,,,,, D,10,,,,,,,,,,, E,10,,,,,,,,,,, So to replicate this in cocoa I used: NSString *CVSData = [NSString stringWithFormat:@"Results\n,,,,,,,,,,,,\nA,%@,,,,,,,,,,,\nB,%@,,,,,,,,,,,\nC,%@,,,,,,,,,,,\nD,%@,,,,,,,,,,,\nE,%@,,,,,,,,,,,",[dataA stringValue], [dataB stringValue], [dataC stringValue], [dataD stringValue], [dataE stringValue]]; Then [CVSData writeToFile:[savePanel filename] atomically:YES]; But when I try to open the saved file with Numbers I get the error “Untitled.cvs” could not be handled because Numbers cannot open files in the “Numbers Document” format. Could this be something with the way cocoa is encoding the file? Thanks for any help

    Read the article

  • Matlab Image watermarking question , using both SVD and DWT

    - by Georgek
    Hello all . here is a code that i got over the net ,and it is supposed to embed a watermark of size(50*20) called _copyright.bmp in the Code below . the size of the cover object is (512*512), it is called _lena_std_bw.bmp.What we did here is we did DWT2 2 times for the image , when we reached our second dwt2 cA2 size is 128*128. You should notice that the blocksize and it equals 4, it is used to determine the max msg size based on cA2 according to the following code:max_message=RcA2*CcA2/(blocksize^2). in our current case max_message would equal 128*128/(4^2)=1024. i want to embed a bigger watermark in the 2nd dwt2 and lets say the size of that watermark is 400*10(i can change the dimension using MS PAINT), what i have to do is change the size of the blocksize to 2. so max_message=4096.Matlab gives me 3 errors and they are : ??? Error using == plus Matrix dimensions must agree. Error in == idwt2 at 93 x = upsconv2(a,{Lo_R,Lo_R},sx,dwtEXTM,shift)+ ... % Approximation. Error in == two_dwt_svd_low_low at 88 CAA1 = idwt2(cA22,cH2,cV2,cD2,'haar',[RcA1,CcA1]); The origional Code is (the origional code where blocksize =4): %This algorithm makes DWT for the whole image and after that make DWT for %cH1 and make SVD for cH2 and embed the watermark in every level after SVD %(1) -------------- Embed Watermark ------------------------------------ %Add the watermar W to original image I and give the watermarked image in J %-------------------------------------------------------------------------- % set the gain factor for embeding and threshold for evaluation clc; clear all; close all; % save start time start_time=cputime; % set the value of threshold and alpha thresh=.5; alpha =0.01; % read in the cover object file_name='_lena_std_bw.bmp'; cover_object=double(imread(file_name)); % determine size of watermarked image Mc=size(cover_object,1); %Height Nc=size(cover_object,2); %Width % read in the message image and reshape it into a vector file_name='_copyright.bmp'; message=double(imread(file_name)); T=message; Mm=size(message,1); %Height Nm=size(message,2); %Width % perform 1-level DWT for the whole cover image [cA1,cH1,cV1,cD1] = dwt2(cover_object,'haar'); % determine the size of cA1 [RcA1 CcA1]=size(cA1) % perform 2-level DWT for cA1 [cA2,cH2,cV2,cD2] = dwt2(cA1,'haar'); % determine the size of cA2 [RcA2 CcA2]=size(cA2) % set the value of blocksize blocksize=4 % reshape the watermark to a vector message_vector=round(reshape(message,Mm*Nm,1)./256); W=message_vector; % determine maximum message size based on cA2, and blocksize max_message=RcA2*CcA2/(blocksize^2) % check that the message isn't too large for cover if (length(message) max_message) error('Message too large to fit in Cover Object') end %----------------------- process the image in blocks ---------------------- x=1; y=1; for (kk = 1:length(message_vector)) [cA2u cA2s cA2v]=svd(cA2(y:y+blocksize-1,x:x+blocksize-1)); % if message bit contains zero, modify S of the original image if (message_vector(kk) == 0) cA2s = cA2s*(1 + alpha); % otherwise mask is filled with zeros else cA2s=cA2s; end cA22(y:y+blocksize-1,x:x+blocksize-1)=cA2u*cA2s*cA2v; % move to next block of mask along x; If at end of row, move to next row if (x+blocksize) >= CcA2 x=1; y=y+blocksize; else x=x+blocksize; end end % perform IDWT CAA1 = idwt2(cA22,cH2,cV2,cD2,'haar',[RcA1,CcA1]); watermarked_image= idwt2(CAA1,cH1,cV1,cD1,'haar',[Mc,Nc]); % convert back to uint8 watermarked_image_uint8=uint8(watermarked_image); % write watermarked Image to file imwrite(watermarked_image_uint8,'dwt_watermarked.bmp','bmp'); % display watermarked image figure(1) imshow(watermarked_image_uint8,[]) title('Watermarked Image') %(2) ---------------------------------------------------------------------- %---------- Extract Watermark from attacked watermarked image ------------- %-------------------------------------------------------------------------- % read in the watermarked object file_name='dwt_watermarked.bmp'; watermarked_image=double(imread(file_name)); % determine size of watermarked image Mw=size(watermarked_image,1); %Height Nw=size(watermarked_image,2); %Width % perform 1-level DWT for the whole watermarked image [ca1,ch1,cv1,cd1] = dwt2(watermarked_image,'haar'); % determine the size of ca1 [Rca1 Cca1]=size(ca1); % perform 2-level DWT for ca1 [ca2,ch2,cv2,cd2] = dwt2(ca1,'haar'); % determine the size of ca2 [Rca2 Cca2]=size(ca2); % process the image in blocks % for each block get a bit for message x=1; y=1; for (kk = 1:length(message_vector)) % sets correlation to 1 when patterns are identical to avoid /0 errors % otherwise calcluate difference between the cover image and the % watermarked image [cA2u cA2s cA2v]=svd(cA2(y:y+blocksize-1,x:x+blocksize-1)); [ca2u1 ca2s1 ca2v1]=svd(ca2(y:y+blocksize-1,x:x+blocksize-1)); correlation(kk)=diag(ca2s1-cA2s)'*diag(ca2s1-cA2s)/(alpha*alpha)/(diag(cA2s)*diag(cA2s)); % move on to next block. At and of row move to next row if (x+blocksize) >= Cca2 x=1; y=y+blocksize; else x=x+blocksize; end end % if correlation exceeds average correlation correlation(kk)=correlation(kk)+mean(correlation(1:Mm*Nm)); for kk = 1:length(correlation) if (correlation(kk) > thresh*alpha);%thresh*mean(correlation(1:Mo*No))) message_vector(kk)=0; end end % reshape the message vector and display recovered watermark. figure(2) message=reshape(message_vector(1:Mm*Nm),Mm,Nm); imshow(message,[]) title('Recovered Watermark') % display processing time elapsed_time=cputime-start_time, please do help,its my graduation project and i have been trying this code for along time but failed miserable. Thanks in advance

    Read the article

  • How to setup .htaccess to rewrite to different folder

    - by Guy
    I'm moving my site to a new host but I need to have my current server continue to handle requests (not all files can be moved to the new server). So I added a parked domain to my old server (old.mydomain.com) and I want all requests to it to be written to the files from the old site. My old site (mydomain.com) was hosted internally in a folder (/public_html/mydomain/) and I want all requests to old.mydomain.com to be rewritten to the same folder. So if mydomain.com/blog was internally at /public_html/mydomain/blog I now want old.mydomain.com/blog also to reach /public_html/mydomain/blog. Here is the .htaccess that I'm trying to use: RewriteCond %{HTTP_HOST} ^old\.mydomain\.com/* RewriteRule ^(.*)$ mydomain/$1 [NC,L] but for some reason as soon as I add the $1 in the rewrite rule I get an internal error. Any ideas?

    Read the article

  • Allowing optional variables with Rewrite Cond

    - by James Doc
    I currently have the following code: RewriteCond %{REQUEST_URI} !assets/ RewriteCond %{REQUEST_URI} !uploads/ RewriteRule ^([a-z|0-9_&;=-]+)/([a-z|0-9_&;=-]+) index.php?method=$1&value=$2 [NC,L] This works perfectly to redirect 'page/home' to 'index.php?method=page&value=home. However at some points I need to add an extra variable or two to the query string such as 'admin/useraccounts/mod/2'. When I simply tack on bits to the end of the rewrite rule it works if all the variables are 'page/home/rand/rand' or 'admin/useraccounts/mod/2', but if anything is missing such as 'page/home' I get a 404. What am I doing wrong? Many thanks.

    Read the article

  • htaccess rewrite issue while testing on localhost

    - by James Doc
    I'm running OSX (10.6) with Apache with .htaccess enabled. In the htaccess file I have the code: Options +FollowSymlinks RewriteEngine on RewriteRule ^page/([A-Z0-9._%+-]+) index.php?page=$1 [NC] This runs perfectly on my external server and redirects nicely to index.php?page=whatever However when testing locally from localhost/~james/In%20Progress/Vila%20Maninga/page/whatever I get redirected to localhost/~james/Users/James/Sites/In%20Progress/Vila%20Maninga/index.php?page=whatever. For some reason 'Users/James/Sites/' is being added. Does anyone why this is happening and how to prevent it? Many thanks, James

    Read the article

  • IPC: Communication between Qt4 and MONO processes (on linux)

    - by elcuco
    I have to connect a Qt4 application to a mono Application. The current proof of concept uses network sockets (which is nice, I can debug using nc on the command line). But I am open to new suggestions. What are my alternatives? Edit: The original application stack is split into two parts: server + client. The client is supposed to show pictures and videos. Since we found that this is not possible in a sane way in Mono, we split the client into two parts: server - client - GUI In the original implementation the client+GUI were the same application. Now client is in C# (running on Mono), and the GUI is Qt4. Rewriting the client in Qt4 is not an option. Right now the communication between the client and the GUI is been done using TCP sockets through localhost. I am looking for better implementations.

    Read the article

  • How can I use htaccess to protect a subdirectory of codeigniter installation?

    - by Art Peterson
    I have codeigniter installed at the root directory, and would like to have a subdirectory called "test" password protected using htaccess. I keep getting a "404 page not found" no matter what I try. The directory structure is: /public_html /css /images /system (codeigniter directory) /test .htaccess .htaccess .htpasswd index.php The root .htaccess file looks like: RewriteEngine On RewriteBase / Options -Indexes # Removes trailing slashes RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ $1 [L,R=301] # Enforce www RewriteCond %{HTTP_HOST} !^(www) [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301] #Checks to see if the user is attempting to access a valid file, #such as an image or css document, if this isn't true it sends the #request to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^(.*)test(.*) RewriteRule ^(.*)$ index.php?/$1 [L] The /test/.htaccess file: AuthUserFile /home/dir/.htpasswd AuthName "Protected Area" AuthType Basic <limit GET POST PUT> require user adminuser </limit> I'm not even getting the authentication prompt, just the codeigniter 404 page when I navigate to the url "http://www.mydomain.com/test/". Please advise!

    Read the article

  • htaccess to change url

    - by Guo Hong Lim
    I have the following code in my .htacess but it didn't work right. Is it because mod-rewrite is no "on", if so, how can i check? Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)\$ $1.php [nc] I wanted to rename my address, example: http://www.abc.com - http://www.abc.com http://abc.com - http://www.abc.com http://www.abc.com/123.html - http://www.abc.com/123 http://www.abc.com/12-12-12.html - http://www.abc.com/12-12-12 http://subdomain.abc.com/123.html - http://subdomain.abc.com/123 Basically removing the extension and ensuring that its www is intact.

    Read the article

  • Remove index.php in CodeIgniter

    - by Gabriel Bianconi
    Hello. I'm trying to remove the 'index.php' from CI Urls. I've tried many solutions, none of them worked. I've already set these variables in 'config.php': $config['index_page'] = ""; $config['uri_protocol'] = "REQUEST_URI"; And my current .htaccess is: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^plugb.com$ [NC] RewriteRule ^(.*)$ http://www.plugb.com/$1 [R=301,L] RewriteCond $1 !^(index\.php|files|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] The www prefix part works fine. But the 'index.php' part doesn't. If you want to check the webpage, here is it: http://www.plugb.com/index.php/home

    Read the article

  • mod_rewrite regex help

    - by Bathan
    HI guys. Im using mod_rewrite to do some redirects on a web site. I want to be able to do the following mySite.com/ - Goto Home mySite.com/foo - Goto redirect.php and redirect acordingly. My redirect rule was RewriteRule (^\w*$) redirect.php?url=$1 [NC] But im oviously missing something because when I go tomySite.com/ I get sent to redirect.php I need a regex that allow lower and upper case letters, as well as underscores but it has to ignore "empty" strings so when I go to mySite.com/ the index file is displayed. Any help? Thanks!

    Read the article

  • Redirect to a specific url depending upon the base url using htaccess file

    - by Goysar
    I am using htaccess to redirect to url with page description. For example RewriteRule ^Flash$ /index.php?section=flash [L,NC] By using this code when i hot domain.com/Flash it redirects me to www.domain.com/index.php? section=flash. This works fine. But now what i want to have two more site with the same htaccess file. So can anyone help me in redirecting the url with same htaccess for multiple site. Can i find the base url and redirect depending on that??

    Read the article

  • Batch file to check if a file exists and raise an error if it doesn't

    - by cfdev9
    This batch file releases a build from TEST to LIVE. I want to add a check constraint in this file that ensures there is an accomanying release document in a specific folder. "C:\Program Files\Windows Resource Kits\Tools\robocopy.exe" "\\testserver\testapp$" "\\liveserver\liveapp$" *.* /E /XA:H /PURGE /XO /XD ".svn" /NDL /NC /NS /NP del "\\liveserver\liveapp$\web.config" ren "\\liveserver\liveapp$\web.live.config" web.config So I have a couple of questions about how to achieve this... There is a version.txt file in the \testserver\testapp$ folder and the only contents of this file is the build number (eg 45 - for build 45) How do I read the contents of the version.txt file into a variable in the batch file? How do I check if a file \fileserver\myapp\releasedocs\ {build}.doc exists using the variable from part 1 in place of {build}?

    Read the article

  • htacces problem

    - by Holian
    Hello! I have a few lines in my .htacess Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^mydomain.org [NC] RewriteRule ^(.*)$ http://www.mydomain.org/$1 [L,R=301] # index.php to / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ /$1 [R=301,L] # forum RewriteCond %{REQUEST_URI} !^/forums/ RewriteRule index.php/(.*) http://forum.mydomain.org/$1 [R=301,L] This code is works well, but i dont know if the code is standard. I would like to set htaccess to: * mydomain.org go to www.mydomain.org (its ok..) * mydomain.org/index.php go to www.mydomain.org (its ok..) * forum.mydomain.org stay forum.mydomain.org (its ok..? ) * www.forum.mydomain.org go to forum.mydomain.org (how?) Could anyone help me to fix this code? Thank you.

    Read the article

  • How to rewrite url to include subdirectory?

    - by Jason Roberts
    The following set of rewrite rules rewrite any urls formatted as foo.mydomain.com/bar to mydomain.com/mysubs/foo/bar.php. This all works fine except if I have a subdirectory named 'blah' in the original url such as foo.mydomain.com/blah/bar, then it will rewrite it as mydomain.com/mysubs/foo/bar (without the blah subdirectory) when what I need is the url to be rewritten as mydomain.com/mysubs/foo/blah/bar. So, what do I need to change to make this work correctly? Options +FollowSymLinks Options -Indexes RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !www.mydomain.com$ [NC] RewriteCond %{HTTP_HOST} ^([^./]+)\.mydomain\.com$ RewriteRule !^mysubs/ mysubs/%1%{REQUEST_URI} [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php

    Read the article

  • Redirect in combination with a rewrite condition in htaccess

    - by Robbert van den Bogerd
    Hi all! I've got a cms-driven website, with no option to change the code. What I want to accomplish is creating friendly url's, using only apaches mod-rewrite engine. The problem is I'm creating an infinite loop, because I first redirect the original url (index.php?id=21) to a friendly one (/friendly/) and then rewrite the '/friendly' part back to 'id=21' I know there should be an extra condition or parameter to avoid looping in this case, but I can´t get one of the possible solutions to work. Here´s the code: RewriteCond %{query_string} ^id=21$ [NC] RewriteRule /* /peuterspeelzaal? [R=301,L] RewriteRule ^peuterspeelzaal$ index.php?id=21 [L]

    Read the article

  • Need help with htacess - over and over

    - by Holian
    Hello! I have this lines in my .htacess Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^mydomain.org [NC] RewriteRule ^(.*)$ http://www.mydomain.org/$1 [L,R=301] # index.php to / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ /$1 [R=301,L] # forum RewriteCond %{REQUEST_URI} !^/forums/ RewriteRule index.php/(.*) http://forum.mydomain.org/$1 [R=301,L] This code is works well, but i dont know if the code is standard. I would like to set htaccess to: mydomain.org go to www.mydomain.org (its ok..) mydomain.org/index.php go to www.mydomain.org (its ok..) forum.mydomain.org stay forum.mydomain.org (its ok..? ) www.forum.mydomain.org go to forum.mydomain.org (how?) Could anyone help me to fix this code? Thank you.

    Read the article

  • .htaccess URL is being cut at a space (I'm using Codeigniter)

    - by Ice
    I've used the following code to map https://live.example.com on to http://example.com/api Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTPS} =on RewriteCond %{HTTP_HOST} ^live\.example\.com [NC] RewriteRule (.+)$ "http://example.com/api/$1" [L,P] The following url: https://live.example.com/userlinks/xml/John%20James/MvPjeUTo15/ Is suppose to map onto: http://example.com/api/userlinks/xml/John%20James/MvPjeUTo15/ Instead it maps it to: http://example.com/api/userlinks/xml/John So it seems to cut it at the space. I am using the Codeigniter framework but I am not sure if the problem lies there. Also using %20 or just a space in the url bar produces no different results. Anyone any idea and/or solution why this happens? Thank you very much, Ice

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >