Search Results

Search found 200 results on 8 pages for 'qsa'.

Page 6/8 | < Previous Page | 2 3 4 5 6 7 8  | Next Page >

  • Problems with mod_Rewrite

    - by Giorgi
    Hello, Originally I had following .htaccess file: php_value display_errors 1 php_value error_reporting 7 AddDefaultCharset utf-8 Options -Indexes <Files ~ ".*\.(info|tpl)$"> Order allow,deny Deny from all </Files> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L,QSA] Which triggered 500 internal server error, so I moved first two lines to the php.ini file. after that, error disappeared, but redirect is not working, it simply redirects to the empty page, error log shows: file not found also, another log shows: PHP Warning: Unknown: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp/:/usr/local/:/usr/bin) in Unknown on line 0 I tried to write in RewriteLog which triggered 500 server error again A little help? Thank you in advance P.S. cPanel 11.24.5-STABLE (Build: 38506) Apache version 2.2.15 (Unix) MySQL version 5.0.85-community PHP version 5.2.9 Operating system Linux Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.5

    Read the article

  • FCGI htaccess handler

    - by sharvey
    I'm trying to setup django on a shared hosting provider. I followed the instructions on http://helpdesk.bluehost.com/index.php/kb/article/000531 and almost have it working. The problem I'm facing now is that the traffic is properly routed throught the fcgi file, but the file itself shows up as plain text in the browser. If I run ./mysite.fcgi in the ssh shell, I do get the default django welcome page. my .htaccess is: AddHandler fastcgi-script .fcgi RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] and mysite.fcgi: #!/usr/bin/python2.6 import sys, os os.environ['DJANGO_SETTINGS_MODULE'] = "icm.settings" from django.core.servers.fastcgi import runfastcgi runfastcgi(method="threaded", daemonize="false") thanks.

    Read the article

  • django urlconf or .htaccess trouble

    - by Zayatzz
    Hello I am running my django project from subfolder of a website. Lets say the address where my project is meant to open from is. http://example.com/myproject/ the myproject folder is root folder for my user account. In that folder i have fcgi script that starts my project. The .htaccess file in the folder contains this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] The trouble is, that at some cases, instead of redireting user to page like http://example.com/myproject/social/someurl/ it redirects to http://example.com/social/someurl/ which does not work. What i want to know is how to fix this problem. Is this django problem and i should change it with urconf and add myproject to all urls, or should i do this with .htaccess? I found similar question, which, sadly, remains unanswered: http://stackoverflow.com/questions/2321154/how-to-write-htaccess-if-django-project-is-in-subfolder-and-subdomain Alan.

    Read the article

  • cakephp site domain change, having 301 issues

    - by veryMickey
    I moved my cakephp site from a subdomain over to a different domain. I handled the permanent redirect in my htaccess file but in the redirect i am losing my neat/clean url handling. old site iphone.gameachievements.org new site gameachievements.org example of current redirect iphone.gameachievements.org/games/jungle-swing - gameachievements.org/index.php?url=games/jungle-swing what i want.. is iphone.gameachievements.org/games/jungle-swing - gameachievements.org/games/jungle-swing here is what my htaccess file looks like... RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] RewriteCond %{HTTP_HOST} iphone.gameachievements.org RewriteRule (.*) http://gameachievements.org/$1 [R=301,L] any help is appricated thanks m!

    Read the article

  • newbie trying to write url rewite in .htaccess file

    - by user297975
    My site was under example.com/waha/ Now I move the site right under the root example.com I want to 301 redirect all the old links like example.com/waha/notice/5803 to example.com/notice/5803 How can I do it? My current .htaccess file is below. <IfModule mod_rewrite.c> RewriteEngine On # NOTE: change this to your actual StatusNet path; may be "/". RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) index.php?p=$1 [QSA,L] </IfModule> <FilesMatch "\.(ini)"> Order allow,deny </FilesMatch> Options -Indexes

    Read the article

  • Hiawatha and Drupal

    - by Botto
    I posted this on serverfault as well, but I probably asked in the wrong group. I am using the Hiawatha web server and running drupal on a FastCGI PHP server. The drupal site is using imagecache and it requires either private files or clean urls. The issue I am having with clean urls is that requests to files are being rewritten into index.php as well. My current config is: UrlToolkit { ToolkitID = drupal RequestURI exists Return Match (/files/*) Rewrite $1 Match ^/(.*) Rewrite /index.php?q=$1 } The above does not work. Drupal's apache set up is: <Directory /var/www/example.com> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </Directory>

    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

  • CodeIgniter - How to hide index.php from the URL

    - by kapil.israni
    This is what my .htaccess looks like. The .htaccess is sitting in /www/scripts directory which is the parent of codeigniter's "system" directory and which also contains index.php. I have enabled mod_rewrite in my Apache 2.2.x. This is on Ubuntu 9.10 server. I followed this link, but it does not work. Is there anything i need to do in apache2, any specific configuration so that this works?? RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [QSA,L]

    Read the article

  • htaccess handler

    - by Steve
    Hi Everyone, I have strange problem that need help. It is about rewrite using apache. Here my .htaccess content file: Options +FollowSymLinks ## This is an example .htaccess-file ## To get everything automatically parsed, the following line is needed #set link auto on ##From now on, every RewriteRule gets recognised. RewriteEngine on RewriteRule captcha(\.html){0,1}$ captcha.php [QSA,L] RewriteCond %{SCRIPT_FILENAME} !-s RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f Rewriterule (.*) handler.php ##You can also change the text before the real link by the following line With this rule, I am hoping that all request except there is exists in file or directory will be directed to my custom handler: handler.php. Everyting just fine as expected but this case not: http://../test/form_login/query=%2Ftest%2Findex.php%3Fpage%3Dform& Root url: /test/, form_login is not file or directory index.php is exists in the root. Apache response with : 404 Page Not Found Thanks for any of your help. Regards, Steve

    Read the article

  • How to create an exception folder in a django site?

    - by ninja123
    There are a few folders where I house my django site that I want to be rendered as it would on any other non-django site. Namely, forum (vbulletin) and cpanel. I currently run the site with fastcgi. My .htaccess looks like this: AddHandler application/x-httpd-php5 .htm AddHandler application/x-httpd-php5 .html AddHandler fastcgi-script .fcgi Options +FollowSymLinks RewriteEngine On RewriteBase / AddHandler application/x-httpd-php5 .htm RewriteCond %{REQUEST_URI} !(mysite.fcgi) RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] What are lines I can add so www.mysite.com/forum can not be picked up by django url and be rendered as it would do normally. Thanks.

    Read the article

  • Hide *.inc.php from website visitors

    - by Ghostrider
    I have a script myscript.inc.php which handles all urls that look like /script-blah I accomplish this by using following .htaccess RewriteEngine On RewriteRule ^script-(.*)$ myscript.inc.php?s=$1 [QSA,L] However users could also access it this way by typing /myscript.inc.php?s=blah I would like to prevent that. I tried <Files ~ "\.inc\.php$"> Order deny,allow Deny from all </Files> and RewriteCond %{REQUEST_URI} \.inc\.php RewriteRule .* - [F,L,NS] They both prevent users from viewing /myscript.inc.php?s=blah but they also cause /script-blah to return 403... Is there a way to do this correctly?

    Read the article

  • Codeigniter's URL Rewriting Problem

    - by Saiful
    I’ve using the following htaccess script so that i can hide index.php from the uri. RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] But i’ve facing a major problem :( I’ve a directory named assets beside my index.php file and it should be there. Now when i browse the directory by browser then the codeigniter’s not found page displays. I can’t browser the file /assets/image.jpg but it displays when i call it from an tag What can i do now? Note that it is working in my local server (localhost) but not in the live server. Signature $@!ful

    Read the article

  • Drupal htaccess redirect - all files in directory to new directory

    - by hfidgen
    Hiya, I've moved a site to Drupal, but am now getting a lot of 404 errors due to the search engines taking their time to update the indexes. The 404 paths all look similar to this: recipedata/ccp1300006/633_L.jpg recipedata/ccp1500005/risotto.jpg recipedata/ccp1500006/haddock.jpg So I'd like to do some htaccess redirection with mod_rewrite to take care of this lot. All the images DO exist - the path has just changed to /sites/default/files/images/ I've edited a lot of redirects into my htaccess already, but because the ccpXXXXXX directory changes I can't quite figure out the regex. This was my last attempt, but yeah - doesn't work :) Can anyone give me some pointers? RewriteRule ^recipedata/(ccp+)/(.+)$ http://domain.co.uk/sites/default/files/images/$2 [R=301,L] This has to be in the context of the Drupal mod_rewrite rules which already exist <IfModule mod_rewrite.c> RewriteEngine on # 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> Thanks!

    Read the article

  • Performance impact of rewrite conditions?

    - by makeee
    My web framework (cakephp) uses the following rewrite conditions and rule: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] I serve up a lot of image files (~10 a second). I'm wondering if it would improve performance to have a rewrite rule that exempted requests for files in my images directory from even trying those rewrite conditions (checking whether the file exists). My traffic is constantly fluctuating, so this would be hard to benchmark, which is why I thought I'd ask here. If that would be beneficial, how might I exclude files in "/images" directory from trying those conditions and rewrite rule?

    Read the article

  • .htaccess rewrite subdomains

    - by Cyclone
    Here is my current code: RewriteCond %{HTTP_HOST} !^example\.com [NC] #RewriteCond %{REQUEST_URI}!^something RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com RewriteRule (.*) something/%1/$1 [QSA,L] My goal is to rewrite http://*.example.com/whatever to http://example.com/something/*/whatever, assuming * is the same for both and whatever is the same for both. However, I believe this is causing an infinite loop somehow, so I added that commented out line (RewriteBase is / btw), but if I uncomment then the entire site is a 500 response code. Without that line, only the subdomains error. What am I doing wrong, and how can I fix this? I have already configured the server so anything gets redirected to my public_html folder. EDIT: For clarification, I am trying to do an internal redirect, not external. EDIT: There is not a flag for internal redirect it seems. Is there any place I can see the actual error message for the broken rewriterule? If I knew what was wrong I would be able to stand a better chance of fixing it.

    Read the article

  • WordPress sub domain htacess problem

    - by user260165
    Well i did a wordpress installation with the newer version now avaialble at dere website.. i did my installation at a subdomain : foo.abc.com the problem came with the permalink which do not work dere bec of the htaccess file. Can any one suggest me how to do that, i need to have only the category/postname Till now i am able to do foo.abc.com/index.php/category/postname - i dont want index.php in it. I have used this htacess file : disable the rewrite engine RewriteEngine on BEGIN WordPress RewriteEngine On RewriteBase /blog/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] RewriteRule ^post/([0-9]+)?/?([0-9]+)?/?$ /index.php?p=$1&page=$2 [QSA] END WordPress Please correct me if possible. thanks

    Read the article

  • URL Rewrite problem. (Many directory)

    - by marharépa
    Hello! I'd like to make a htaccess file, which can make a good structure for my websites. My .htaccess is now: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$ RewriteCond %{REQUEST_URI} !^/admin/* RewriteRule ^(.*)$ index.php?q=$1 [QSA] (based on Sombat's comment) And I want to make this, with it: for every elements but (jpg|jpeg|gif|png|css|js|pl|txt) if domain.xx/admin redirect to the domain.xx/admin directory and don't make a rewrite at all i mean: let me use domain.xx/admin/index.php?asd=1&asdd=2 else rewrite everything as rule one, to index.php. Thanks for the help.

    Read the article

  • Remove .php extension (explicitly written) for friendly URL

    - by miquel
    htaccess to remove the .php extension of my site's files. RewriteEngine on RewriteBase / RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.*)$ $1.php [L,QSA] Now, if I go to my site www.mysite.com/home works fine, it redirects to home.php but the URL is still friendly. But if I write this URL: www.mysite.com/home.php The home.php is served, and the URL is not friendly. How can I avoid this behavior? I want that if the user writes www.mysite.com/home.php, the URL displayed in the URL bar be www.mysite.com/home

    Read the article

  • Unexpected htaccess behaviour (mod_rewrite and apache)

    - by avastreg
    Yeah, mod_rewrite is driving me crazy. Here is the problem: my htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] when i try to access the page advantix (so address was www.mywebsite.com/advantix), i'm being redirected to advantix/?url=advantix Looking at the access log, i have a suspicious 301 in the middle "GET /advantix HTTP/1.1" 301 335 "-" "Mozilla/5.0" "GET /advantix/?url=advantix HTTP/1.1" 200 186 "-" "Mozilla/5.0" There is one important detail: advantix is a directory. So, if i comment that rule, advantix goes to the folder and list the files. Why it applies automatically the / if there's a folder matching? I don't want to reach the folder, i want to reach index.php?url=advantix with a call to advantix. I have the rewriteLogs too, but they didn't help more. My vhost conf has Directory tag with Options All, if helps, i don't know much about that.

    Read the article

  • Apache Rewrite Excluding Assets Directory

    - by Midiane
    Hi all I'm writing a mini-MVC application. App architecture: actions/ templates/ site/ app/ styles/ images/ scripts/ So far, I've got a controller working properly, taking in all requests. However, javascript files are not being rendered properly in the browser; I'm getting a 404 Not Found when I try to load the file in the browser. Here is my current Directory config in a vhost file: DirectoryIndex index.php RewriteEngine On RewriteBase /apps/ecatalogue RewriteRule ^scripts/(.*) - [NC,L] <--- Rule not working RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [NC,L,QSA] I can confirm everything else works; I just need apache to ignore anything in scripts so the file can be loaded normally without being processed by the controller. Your help is appreciated.

    Read the article

  • Append a parameter to a querystring with mod_rewrite

    - by Matt
    Hello, I would like to use mod_rewrite to append a parameter to the end of a querystring. I understand that I can do this using the [QSA] flag. However, I would like the parameter appended ONLY if it does not already exist in the querystring. So, if the querystring was: http://www.mysite.com/script.php?colour=red&size=large I would like the above URL to be re-directed to http://www.mysite.com/script.php?colour=red&size=large&weight=heavy Where weight=heavy is appended to the end of the querystring only if this specific parameter was not there in the first place! If the specific parameter is already in the URL then no redirect is required. Can anybody please suggest code to put in my .htacess file that can do this? Thanks.

    Read the article

  • problem with .htaccess and mod_rewrite

    - by ian
    My below .htaccess file should send everything to my index.php page where my framework [Fat Free Frameowkr] handles it. However if I go to http://www.site.com/ it works. If I go to http://www.site.com/about I get a 404 error. Any ideas? # Enable rewrite engine and route requests to framework RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [L,QSA] # Disable ETags Header Unset ETag FileETag none # Default expires header if none specified (stay in browser cache for 7 days) <IfModule mod_expires.c> ExpiresActive On ExpiresDefault A604800 </IfModule>

    Read the article

  • Set up CakePHP in a subdirectory; Wordpress is installed in the root

    - by Derek Chiang
    I have been searching for a solution for 2 hours but nothing seems to work... here is my problem: I have WordPress installed in the root (var/www). So by going to http://www.geekderek.com, I see my wordpress site. I put CakePHP in a subdirectory var/www/cakephp. I want to be able to see my CakePHP app by going to: www.geekderek.com/cakephp. However, currently this url just returns a Wordpress page saying "Content not found." I believe this problem can be solved by modifying .htaccess in my root directory. So here is my .htaccess: http://pastebin.com/sXJTRstB As you can see, I added this line to the default WP .htaccess file: RewriteRule ^cakephp(/(.*))?$ cakephp/app/webroot/$1 [QSA,L] However, for some reason this doesn't seem to work. Could anyone please tell me what is wrong?? Thank you so much!

    Read the article

  • Using .htaccess to rewrite dynamic subdomains

    - by brokekidweb
    I'm currently using .htaccess to rewrite on my website to create dynamic subdomains. I also use it to remove the .php extension on all pages. However, once inside the subdomain, it tries to redirect again. For example, if you went to https://admin.example.com/test, it would actually be accessing https://example.com/clients/admin/test.php. I keeping getting various 404 errors using the following .htaccess file: Options +MultiViews Options +FollowSymLinks RewriteEngine On RewriteRule ^subdomains/(.*)/(.*) http://$1.example.com/$2 [r=301,nc] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] RewriteCond %{HTTP_HOST} !^(www\.)?example\.com$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.example\.com$ [NC] RewriteCond %{DOCUMENT_ROOT}/%2%{REQUEST_URI}/ -d RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L] RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{HTTP_HOST} !^(www\.)?example\.com$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.example\.com$ [NC] RewriteRule ^(.*)$ clients/%2/$1 [QSA,L] How can I keep this from redirecting to https://admin.example.com/clients/admin/test.php?

    Read the article

  • Notice Undefined index url

    - by user1906992
    I'm doing youtube mvc tutorial http://www.youtube.com/watch?v=Aw28-krO7ZM and have stopped on the best first step: my index.php file: <?php $url = $_GET['url']; require 'controllers/' . $url . '.php'; My .htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?url=$1 [QSA,L] so, the question is next: when i go on any other url except 'index' it works good. So what's wrong with 'index' url? Notice: Undefined index: url in /var/www/sadman/index.php on line 2 Warning: require(controllers/.php) [function.require]: failed to open stream: No such file or directory in /var/www/sadman/index.php on line 4 Btw, i have LAMP, and i think my settings are wright.

    Read the article

< Previous Page | 2 3 4 5 6 7 8  | Next Page >