Search Results

Search found 2277 results on 92 pages for 'mod rpaf'.

Page 62/92 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • mod_perl and libs

    - by paulj3000
    Hi, I just installed my system with Oracle 64bit Linux5.4 running Apache Server version: Apache/2.2.3 and mod_perl 2. Now, I have my perl libraries set in a specific path: /my/perl/libs and I have adjusted my httpd.conf to compensate for this (I added the below): SetEnv MY_LIBS /my/perl/libs and in my cgi I'm setting my environment to compensate: use lib($ENV{'MY_LIBS'}); Now the problem: Sometimes my perl modules will recognize the path of /my/perl/libs and call all the functions appropriately, and sometimes they won't, thus thowing a 500 error. Some observations: when I restart apache (/etc/init.d/httpd restart), things work fine but then the 500 error comes up. Are there any ideas? What should I be looking at? Thanks

    Read the article

  • How do I use multiple settings file in Django with multiple sites on one server?

    - by William Bing Hua
    I have an ec2 instance running Ubuntu 14.04 and I want to host two sites from it. On my first site I have two settings file, production_settings.py and settings.py (for local development). I import the local settings into the production settings and override any settings with the production settings file. Since my production settings file is not the default settings.py name, I have to create an environment variable DJANGO_SETTINGS_MODULE='site1.production_settings' However because of this whenever I try to start my second site it says No module named site1.production_settings I am assuming that this is due to me setting the environment variable. Another problem is that I won't be able to use different settings file for different sites. How do I start use two different settings file for two different websites?

    Read the article

  • Mod_rewrite works on local, not on remote, version?

    - by TylerT
    I have this site. Let's call it htp://www.mysite.com I have a rewrite rule to change htp://www.mysite.com/?q=words%20etc/0/10 into http://www.mysite.com/words%20etc/0/10 (or http://www.mysite.com//0/10 or http://www.mysite.com/0/10) .htaccess:ErrorDocument 404 htp://www.mysite.com/404.html options +FollowSymlinks rewriteEngine on rewriteCond %{REQUEST_URI} !-f rewriteCond %{REQUEST_URI} !-d rewriteCond %{REQUEST_URI} !index\.php rewriteRule ^/?([^/]+?)?/?([0-9]+?)/([0-9]+?)$ index.php/%{THE_REQUEST} [NC] Now, this works on my local apache 2.2.11 server, no errors. However on my host's apache 1.3.41 server, I get the following error: [Sat Mar 5 21:42:14 2011] [alert] [client [ip]] /home/_/public_html/mysite.com/.htaccess: RewriteRule: cannot compile regular expression '^/?([^/]+?)?/?([0-9]+?)/([0-9]+?)$'\n I imagine it's something quirky about the apache version as other sites on this host use mod_rewrite without a hitch. I've tried removing the +followSymlinks line, even the rewrite engine line. I haven't tried removing the conditions cause I don't think I should have to, I'm probably wrong.

    Read the article

  • modrewrite to another server if file/image is not found

    - by Traveling_Monk
    Hi I am working on a locally served copy of a remote site and I don't want to have to download all the images rtelated to the site so I thought i could come up with a mod_rewrite rule for to grab images from the remote server if the are not found this is the code that i have <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [NC] RewriteRule ^/(.*\.(png|gif|jpg|jpeg)) https://www.exmple.com/$1 [NC,P,L] </IfModule> The page is still giving me 404's for images that are on the remote server, so this rule is not working. I do know that the htaccess is being processed because rules later in the IfModule mod_rewrite.c block are being used. (i simplified my code sample but this is the first rule in the IfModule mod_rewrite.c block)

    Read the article

  • Best (or appropriate) WSGI server for this Python script? - Python

    - by RadiantHex
    Hi folks, I'm having quite a problem deciding how to serve a few Python scripts. The problem is that the basic functionality could be generalized by this: do_something() time.sleep(3) do_something() I tried various WSGI servers, but they have all been giving me concurrency limitations, as in I have to specify how many threads to use and so on. I only wish that the resources on the server be used efficiently and liberally. Any ideas?

    Read the article

  • Using htaccess rewrite to make a subdirectory be its own root for root relative path requests

    - by Scott
    Can I use htaccess to capture requests from a certain subdirectory and make that directory use itself as the root directory for any root relative path requests? For example if I have... http://www.example.com/subFIXED/subANY/restofpath ...where subFIXED is always the same directory, subANY is any immediate subdirectory of subFIXED, and I want a redirection of all href/src requests from any file under subANY to use subANY as the 'root' (sort of like a subdomain), in effect having root level requests use this as the root directory level: http://www.example.com/subFIXED/subANY/ Instead of this: http://www.example.com/ I'm assuming I can put an htaccess file in subFIXED to handle all calls coming from anything under any subANY, but not being very familiar with htaccess rewriting, variables, etc., I can't figure out how to capture which subANY directory is making the root level request and then use that capture to make a rewrite to consider that directory the root level of any root relative path requests from it. Thanks for your help

    Read the article

  • mod_rewrite htaccess redirect on specific request

    - by John
    is there a way to make mod_rewrite redirect all urls contain the following request: ?do=page&f=* to a specific page? for example: http://example.com/index.php?do=page&f=2 http://example.com/index2.php?do=page&f=4 http://example.com/page.php?do=page&f=22 to: http://example.com/custom.php

    Read the article

  • RewriteRule not working do not know how to test it the regex matches

    - by user564559
    Hello I have a Rewrite rule I am trying to implement on my local host but I cannot get it to do the action no matter how I setup the regex the files are in this naming scheme /docroot/css/stylesheet.min.css and I have them printed in the code like /docroot/css/stylesheet.min.123438348.css (the number is example it comes from a get modified function). Note docroot is an example directory how can I have the server ignore the numbers and redirect to the stylesheet.min.css I need to do this for every css and js files (/js and /css) as well as one specific spritemap image my current attempt RewriteRule ^/(docroot)/(js|css)/(.+)\.(min)\.(.+)\.(js|css)$ /$1/$2/$3.$4.$6 RewriteRule ^(/docroot/images/spritemap)\.([0-9]+)\.(png)$ $1.$3 I have this wrapped in a I am on linux..should this be mod_rewrite.so?"

    Read the article

  • Website image caching with Apache

    - by Piskvor
    How can I get static content on Apache to be {cached by browser} and not {checked for freshness {with every request}}? I'm working on a website hosted on Apache webserver. Recently, I was testing something with headers (Content-Type for different types of content) and saw a lot of conditional requests for images. Example: 200 /index.php?page=1234&action=list 304 /favicon.ico 304 /img/logo.png 304 /img/arrow.png (etc.) Although the image files are static content and are cached by the browser, every time an user opens a page that links to them, they are conditionally requested, to which they send "304 Not Modified". That's good (less data transferred), but it means 20+ more requests with every page load (longer page load due to all those round-trips, even with Keep-Alive and pipelining enabled). How do I tell the browser to keep the existing file and not check for newer version? EDIT: the mod_expires method works, even with the favicon.

    Read the article

  • rewrite all requests from one folder to a parent folder htaccess

    - by Neo
    This one has me stumped, I need to re-write all requests to the javascript folder (js) to a special library handler system. e.g. rewrite http://localhost/admin/js/bar.js --> http://localhost/_lib/=admin/js/bar.js Any ideas? I have tried the following which creates an error RewriteCond %{REQUEST_URI} ^(.*)$ RewriteRule ^(.*)$ /%1/_lib/$1 [NC] (36)File name to long: cannot map GET /admin/js/bar.js to file

    Read the article

  • Error in django using Apache & mod_wsgi

    - by Ignacio
    Hey, I've been doing some changes to my django develpment env, as some of you suggested. So far I've managed to configure and run it successfully with postgres. Now I'm trying to run the app using apache2 and mod_wsgi, but I ran into this little problem after I followed the guidelines from the django docs. When I access localhost/myapp/tasks this error raises: Request Method: GET Request URL: http://localhost/myapp/tasks/ Exception Type: TemplateSyntaxError Exception Value: Caught an exception while rendering: argument 1 must be a string or unicode object Original Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py", line 71, in render_node result = node.render(context) File "/usr/local/lib/python2.6/dist-packages/django/template/defaulttags.py", line 126, in render len_values = len(values) File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 81, in __len__ self._result_cache = list(self.iterator()) File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 238, in iterator for row in self.query.results_iter(): File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 287, in results_iter for rows in self.execute_sql(MULTI): File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 2369, in execute_sql cursor.execute(sql, params) File "/usr/local/lib/python2.6/dist-packages/django/db/backends/util.py", line 19, in execute return self.cursor.execute(sql, params) TypeError: argument 1 must be a string or unicode object ... ... ... And then it highlights a {% for t in tasks %} template tag, like the source of the problem is there, but it worked fine on the built-in server. The view associated with that page is really simple, just fetch all Task objects. And the template just displays them on a table. Also, some pages get rendered ok. Don't want to fill this Question with code, so if you need some more info I'd be glad to provide it. Thanks

    Read the article

  • .htaccess url rewrite with ssl redirection

    - by Stuart McAlpine
    I'm having trouble combining a url query parameter rewrite (fancy-url) with a .htaccess ssl redirection. My .htaccess file is currently: Options +FollowSymLinks Options -Indexes ServerSignature Off RewriteEngine on RewriteBase / # in https: process secure.html in https RewriteCond %{server_port} =443 RewriteCond $1 ^secure$ [NC] RewriteRule ^(.+).html$ index.php?page=$1 [QSA,L] # in https: force all other pages to http RewriteCond %{server_port} =443 RewriteCond $1 !^secure$ [NC] RewriteRule ^(.+).html$ http://%{HTTP_HOST}%{REQUEST_URI} [QSA,N] # in http: force secure.html to https RewriteCond %{server_port} !=443 RewriteCond $1 ^secure$ [NC] RewriteRule ^(.+).html$ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,N] # in http: process other pages as http RewriteCond %{server_port} !=443 RewriteCond $1 !^secure$ [NC] RewriteRule ^(.+).html$ index.php?page=$1 [QSA,L] The fancy-url rewriting is working fine but the redirection to/from https isn't working at all. If I replace the 2 lines containing RewriteRule ^(.+).html$ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,N] with RewriteRule ^(.+).html$ https://%{HTTP_HOST}/index.php?page=$1 [QSA,L] then the https redirection works fine but the fancy-url rewriting doesn't work. Is it possible to combine these two?

    Read the article

  • mod_rewrite - can't combine rules

    - by mikua
    I have 3 rules: # DEL www. from URL RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] # DEL /index.php fron URL RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/ RewriteRule ^(([^/]+/)*)index\.php$ http://masterok.kiev.ua/$1 [R=301,L] # ADD / to URL RewriteRule ^([^.]+[^./])$ /$1/ [R=301,L] All the rules work individually, but when you use them at the same time - there is a looping and the site don't open... Help please to combine them

    Read the article

  • Apache modules installed but don't seem to load in Ubuntu

    - by SODA
    I am pretty new to Linux. Got a VPS set up yesterday, installed Apache2, PHP5 and MySQL. When I do apache2 -l I get this: Compiled in modules: core.c mod_log_config.c mod_logio.c prefork.c http_core.c mod_so.c When I do sudo a2enmod rewrite I get this: Module rewrite already enabled And rewrite.load is in /etc/apache2/mods-enabled. Can anyone tell what's wrong?

    Read the article

  • does mod_rewrite output have to exist?

    - by user788171
    I am trying to use mod_rewrite to generate cleaner urls. I have the following in my .htaccess Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule ^mypage.php$ https://%{HTTP_HOST}/mypage [R=301,L] The objective is to go from https://mysite.com/mypage.php to https://mysite.com/mypage This gives me a 404 error. I don't actually have the directory mypage/ existing. But from my understanding, I don't need to actually have mypage for mod_rewrite to work. What am I doing wrong?

    Read the article

  • What causes Apache Environment Variable set using mod_rewrite to have "redirect_" appended to name?

    - by trowel
    I am trying to set Apache environment variables (for use in PHP) with the [E=VAR:VAL] flag on RewriteRule rules in an .htaccess file. I have already discovered the variables are accessed in PHP as server variables $_SERVER rather than $_ENV (which makes a certain amount of sense). However, my problem is for some rules the [E=VAR:VAL] flag works as expected and I end up with a variable $_SERVER['VAR'] but for other rules I end with a variable $_SERVER['REDIRECT_VAR'] or $_SERVER['REDIRECT_REDIRECT_VAR'], etc A. What causes an Environment Variable set in Apache using the [E=VAR:VAL] flag to get renamed by having "REDIRECT_" appended to the front of the variable name? B. What can I do to make sure I end up with an Environment Variable with an unchanged name so I can access it in PHP as $SERVER['VAR'] without having to resort to checking for variations of the variable name having one of more instances of "REDIRECT" appended to the front of it?

    Read the article

  • .htaccess & mod_rewrite for passing GET parameters

    - by Joel Alejandro
    Currently I use this to pass GET parameters on an "elegant" way: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]*)/$ index.php?module=$1 [L] RewriteRule ^([^/]*)/([^/]*)/$ index.php?module=$1&object=$2 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/$ index.php?module=$1&object=$2&submodule=$3 [L] This works great for 3 parameters max., (and I'm sure it's seriously ugly). Any way to do the same thing, for n-paremeters?

    Read the article

  • URL rewrite to remove parameters

    - by samoyed
    Hello to all, I'm working on a site where all the pages are actually index.php + a 'name' parameter that is analyzed and loads the appropriate template and content. the homepage url is: http://www.some_site.com/?page=homepage 1. i was asked to "change" the homepage url to: http://www.some_site.com can i use url rewite and htaccess for that and if so, what should i write there? working on my local machine, i tried this code (mode rewrite is enabled): <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteRule /index.php /index.php?page=homepage </IfModule> i would still need the 'name' parameter to be available to the php code of course, so i can load the template and css files. 2. it would be nice for other pages (not homepage) to be converted from (example) http://www.some_site.com/?page=products to: http://www.some_site.com/products this is less crucial. thanx in advance and have a nice day :-)

    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

  • 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

  • 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

  • mod_rewrite with GET requests

    - by iMaster
    I have mod_rewrite working on most of my site. Right now I have a search that normally would point to search.php?keyword=KEYWORD And I'm trying to rewrite that to search/?keyword=KEYWORD Just to make it a little bit cleaner. So here's my mod_rewrite. (There are other rules I'm just posting the one that isn't working.) RewriteRule ^search/?keyword=([^/\.]+)/?$ search.php?search=$1 When I type a search in the address bar way I want it to be, I get a page telling me its a "broken link" (I'm guessing that that's Chrome's equivalent of a 404 error). So what am I doing wrong? I think that the problem is the '=' or the '?' sign in the rule (the first part) because when I take the ?keyword= part out, it works. Does that make sense?

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >