Search Results

Search found 14546 results on 582 pages for 'mod authz host'.

Page 88/582 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • Redirecting and Remapping with mod_rewrite

    - by Droid646197
    First of all, am new to doing back-end server admin.. I have a main website being served on at certain IP. I have a blog address that lives on another IP, which was used on wordpress.com. When a user typed in blog.domain.com it would resolve to the Wordpress.com site. Since coming on board (two months) they wanted me to bring the blog in house. So, I set up a wordpress install at domain.com/blog. I would like blog.domain.com (different ip) to resolve to domain.com/blog but still using blog.domain.com is this possible with Apache and mod_rewrite?

    Read the article

  • Apache mod_rewrite - remove extension/add trailing slash/preserve directory structure

    - by Henry Wrinkler
    I am currently using the following .htaccess file to remove the .php extension from my files and add a trailing slash to all URLs: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^([^/]+)/$ $1.php # Forces a trailing slash to be added RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule (.*)$ /$1/ [R=301,L] This is working great, however, when I have a php file in a directory, and I want to serve that file from a directory I get a 404 error. Is there a way to do this with 1 .htaccess file in the root. I really don't want to remember to put a .htaccess file in each directory. Right now www.myexample.com/information/ Serves /information.php. Great! However www.myexample.com/categories/category-1/ this throws a 404 even though the file /categories/category-1.php does exist. I would like to modify my .htaccess file so this serves /categories/category-1.php.

    Read the article

  • mod_rewrite with AJAX applictions: possible?

    - by MrJackV
    I am trying to run Shell In a Box (link) through another server (the computer running shellinabox is not accessible from the internet) . Ideally I could use ProxyPass in the Apache config to have a reverse proxy. Problem is I can't access the conf file. So I tried using .htaccess and I discover that I cannot use ProxyPass in there. So I tried and used mod_rewrite to do the job. Currently I have the following on the .htaccess file RewriteEngine On RewriteRule ^$ http://10.1.13.236:4200/ [P] However while it displays the title correctly and if I open up the source code I can see there is something in the page, nothing is diplayed on the screen (it remains blank). My suspicion is that there are problems with AJAX and this kind of proxy. What I am trying to accomplish with the mod_rewrite as close as possible behaviour to ProxyPass (Mirorr a website in a subdirectory). Is this possible? Is there some other solution (I tried phproxy and khproxy but neither of them is able to display anything)? Thanks in advance

    Read the article

  • htaccess rewriterule leading slash

    - by Tiddo
    I'm using htaccess to rewrite my urls so that I can have nice clean urls. However, the same htaccess file does different things on my local server and my remote server: On my local server the url to the website is like http://localhost/example/ and on my remote server the url is http://example.com/. For my local server I can use the following htaccess redirect rule: RewriteRule ^(.*)$ index.php?page=$1 [L,QSA] However, when I use this on my remote server I get an internal server error. Instead I have to use this: (note the leading slash) RewriteRule ^(.*)$ /index.php?page=$1 [L,QSA] Unfortunately this doesn't work on my local server: this rewrite rule requests http://localhost/index.php instead of http://localhost/example/index.php on my local server. How can I make this work on both my remote and local server?

    Read the article

  • gzip compression good or bad?

    - by WarDoGG
    I have a server that currently does a lot of processing in my application and the target users are those who have a very good internet connection. The output that is sent from the server is always text/html and we do not use any media (audio/video) only images (static site images like logo,etc). We are experiencing severe performance issues and I wonder if turning off gzip/mod_deflate on the server so that the server would avoid compressing the output. Will this cause an improvement in performance?

    Read the article

  • htaccess rewrite domain/folder to domain/

    - by user1678259
    I've been checking all questions previously made here, but can't find a solution. We have a website nearly finished www.example.com/web/ and would like to hide the folder /web/ from the url. So what is shown is: www.example.com/web/* And would like: www.example.com/* If we try with a redirect, the url www.example.com goes to www.example.com/web/. And this is what we don't want. Any help will be very appreciated. Thank you all.

    Read the article

  • Force www. on multi domain site and retain http or https [closed]

    - by John Isaacks
    I am using CakePHP which already contains an .htaccess file that looks like: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> I want to force www. (unless it is a subdomain) to avoid duplicate content penalties. It needs to retain http or https Also This application will have multiple domains pointing to it. So the code needs to be able to work with any domain.

    Read the article

  • Disable modsec2 blacklist rule for specific hostname

    - by KevinL
    I have a server running Apache2 with mod_security2. In modsec2.user.conf, there is a blacklist rule: ###BLACKLIST### SecRule REQUEST_URI "mkdir" I need to disable that rule for just one hostname on the server. I realize I could just remove it entirely but I'd rather keep it on for the other sites. I realize you can use the SecRuleRemoveByID directive, based on each rule's ID, but as you can see above, this has no ID, it's just a string. How do I disable that rule for just www.example.com, is there something I can do in custom.conf, whitelist.conf or exclude.conf ?

    Read the article

  • Can't locate API module structure `mod_wsgi'

    - by a coder
    I'm working on setting up Trac to use wsgi, and am running into trouble getting mod_wsgi working. I downloaded and installed mod_sgi. [box]# apachectl configtest httpd: Syntax error on line 214 of /etc/httpd/conf/httpd.conf: Can't locate API module structure `mod_wsgi' in file /etc/httpd/modules/mod_wsgi.so: /etc/httpd/modules/mod_wsgi.so: undefined symbol: mod_wsgi Line 214 of httpd.conf: LoadModule mod_wsgi modules/mod_wsgi.so Here is mod_wsgi.so as found on the filesystem: [box]# locate mod_wsgi.so /usr/lib64/httpd/modules/mod_wsgi.so What might I be overlooking?

    Read the article

  • Get Forbidden running under admin

    - by Overdose
    I'm running on the localhost under admin login. And get forbidden everytime: [Mon Jun 07 19:17:40 2010] [error] [client 127.0.0.1] client denied by server configuration: C:/WebPages/ <Directory "C:/WebPages/*"> Order allow,deny Allow from all AddHandler wsgi-script .wsgi Options ExecCGI RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /cms66.wsgi/$1 [QSA,PT,L] </Directory>

    Read the article

  • mod_rewrite only one extension

    - by Matthias Reisner
    Currently I'm having the following htaccess content: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^(.*).html$ $1.php </IfModule> I want to change the php extension to html. Now if I browse for localhost/xx.html I get the right content. BUT I also can use xx.php or xx to access the oontent! I only want to get the content if there is an html extension! How can I make this work??? Example: On the server I have the file foo.php. Now I want the user to type in foo.html in the browser to get the content of foo.php. But if he types foo.php there will be an error. I already tried this RewriteRule ^(.*)[^\.html]$ error.php RewriteRule ^(.*)\.html$ $1.php But that does not really work Thanks!

    Read the article

  • Access Rails under /app/, not /app/public/

    - by blinry
    I'm trying to deploy Rails 2.1.2 with Apache 2.2.10 and FastCGI (yeah, bad, ancient, ugly, I know). My application can be accessed via example.com/app/public/, but I want to access it via example.com/app/. In my .htaccess-File (in the app/-directory!) I have: RewriteEngine On RewriteBase /app/ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ public/dispatch.fcgi [QSA,L] How can I forward each request going to app/ to app/public/? Every time I try this (like, with RewriteRule ^.*$ public/$1 [QSA]) I get a routing error: No route matches "/app/" with {:method=>:get} Help?

    Read the article

  • Having trouble searching for a ‘.’ using htaccess.

    - by ThisLanham
    I'm setting up a website that (ideally) would allow users to access other users' homepages with a url in the format "www.mysite.com/ThisLanham" where 'ThisLanham' is the username. The username begins with a letter and can consists of any alphanumeric character along with an underscore, hyphen, or period. So far, the redirection has worked perfectly when I ignore usage of the period character. The following code handles that request: RewriteRule ^([a-zA-Z][0-9a-zA-Z-_]*)/?$ Page/?un=$1 [NC,L] However, I've tried a number of ways it check for the period as well, but all have resulted in a 500 Internal Server Error. Here are some my attempts: RewriteRule ^([a-zA-Z][0-9a-zA-Z-\_\\.]\*)/?$ Page/?un=$1 [NC,L] RewriteRule ^([0-9a-zA-Z-\_\\.]\*)/?$ Page/?un=$1 [NC,L] RewriteRule ^([a-zA-Z].\*)/?$ Page/?un=$1 [NC,L] RewriteRule ^(.\*)/?$ Page/?un=$1 [NC,L] also tried... RewriteCond $1 != index.php RewriteRule ^([a-z][0-9a-z-_.]*)/?$ Page/?un=$1 [NC,L] My backup plan is to no longer allow users to include periods in their usernames, but I'd much rather find a solution. Any ideas?

    Read the article

  • vBulletin 5 + lighttpd url rewriting

    - by Boots
    I'm trying to get vBulletin 5 up and running under lighttpd but I'm having some problems with url rewriting. Here is the apache .htaccess provided by vBulletin. <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA] #needed because admincp is an actual directory. RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA] </IfModule> If this helps, this is the IIS config provided by vBulletin <?xml version="1.0" encoding="UTF-8"?> <!-- This file is to support redirection in IIS. It is harmless if you are running under Apache --> <configuration> <system.webServer> <rewrite> <rules> <rule name="Main Redirect" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="index.php/{R:1}" /> </rule> <rule name="Admincp" stopProcessing="true"> <match url="^(admincp/)$" ignoreCase="false" /> <action type="Rewrite" url="index.php/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> Anyone have any suggestions as to the lighttpd url.rewrite equivalent? All my experiments have failed thus far. I'm running lighttpd-1.4.31-1 I tried this but it didn't work. I think it has something to do with me not properly emulating [QS] in the .htaccess url.rewrite-once = ("^(.*)$" => "index.php?routestring=$1", "^(admincp/)$)" => "index.php?routestring=$1") This has gotten me closer but not fully functional yet. url.rewrite-if-not-file = ("^(.*)$" => "index.php?routestring=$1", "^(admincp/)$)" => "index.php?routestring=$1")

    Read the article

  • htaccess rewrite condition old site to new site with querystring

    - by Brandon Braner
    I am not even going to pretend to fully understand how htaccess rewrite conditions work. I've been working on this for a while searching and searching. I have an old Wordpress site www.old-site.com and a new site www.site.com. Wordpress uses query strings page_id=# to redirect to pages. On the old site page_id=2 went to a specific page but on the new site it goes the the home page. I need old-site/?page_id=2 to go to site.com/our-company Here is what I am trying RewriteCond %{HTTP_HOST} ^(www\.)?old-site.com$ [NC] RewriteCond %{QUERY_STRING} ^page_id=2$ RewriteRule ^(.*)$ http://www.site.com/our-company/ [R=301,L] If I take out the rewrite condition for query string it redirects all traffic from old-site.com to the company page on the new site. Where am I going wrong? I have about 15 redirects I need to do this way.

    Read the article

  • Apache with mod_perl eating memory when idle

    - by syneticon-dj
    An Apache webserver running a mod_perl application is exposing abnormal memory usage - after the "day load" ceases, the system's memory is being exhausted by the Apache processes and oom_killer is being invoked. As the load returns the following morning, the memory usage normalizes - probably because Apache workers get recycled periodically if a sufficient number of hits is generated: This is the graph for apache hits per second to correlate: The remaining 2 hits per second throughout the night are induced by HAProxy checks - it runs HEAD http://mydomain.example.com/running HTTP/1.0 requests against the server every half a second with "running" being a static file (i.e. not invoking any perl code). It also seems that disabling these checks remedies the memory usage problem, but obviously cannot be a solution. All of 3 similarly configured servers (behind HAProxy) expose this behavior. The running OS is Ubuntu 10.10, Apache version 2.2.16. This seems to be a memory leak but I have no idea how to start debugging it - any hints?

    Read the article

  • nginx redirects and rewrites

    - by ptheofan
    I'm closing a website but want to maintain a couple of urls working plus a static html file to serve as index. All old urls should redirect to root (/) except a couple of chosen locations. Here's an example of what I need to do All should give 301 permanent to / http:://www.domain.tld/whatever/anything/realy == 301 ==> http://www.domain.tld http:://www.domain.tld/blabla == 301 ==> http://www.domain.tld http:://www.domain.tld/ == 301 ==> http://www.domain.tld except for http://www.domain.tld/special.html == serve ==> special.html root should serve the defailt file (as specificed in index) http:://www.domain.tld == serve => somefile.html

    Read the article

  • Use mod_rewrite to force users to homepage when entering a site?

    - by scotru
    Is it possible to use mod_rewrite to force all users entering a site (either through a link from another site, or by typing a URL in the address bar) to be redirected to the homepage? From the homepage (or any page within the site), users should then be able to access other pages in the site. But all users would be forced to enter the site through the homepage. Can this be done with mod_rewrite (or without using a scripting language)?

    Read the article

  • Url rewrite rule

    - by vvr
    How to redirect a page form show.php?id=(15charstring) to show/(15charstring) I tried like this it is doing reverse means it is redirecting /show/(15chars) to show.php?id=(15chars) RewriteEngine on RewriteRule ^/show/([a-zA-Z0-9]{15})$ http://site.com/show.php?id=$1 Second case is i have to redirect to another page if he added &m=true to the url show.php?id=(15chars)&m=true html/show.php?id=(15chars).

    Read the article

  • Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask?

    - by Kyle Brandt
    How can I become an expert at writing mod_rewrite rules? What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?

    Read the article

  • amazon ec2-medium apache requests per second terrible

    - by TheDayIsDone
    EDITED -- test running from localhost now to rule out network... i have a c1.medium using EBS. when i do an apache benchmark and i'm just printing a "hello" for the test from localhost - no database hits, it's very slow. i can repeat this test many times with the same results. any thoughts? thanks in advance. ab -n 1000 -c 100 http://localhost/home/test/ Benchmarking localhost (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Completed 600 requests Completed 700 requests Completed 800 requests Completed 900 requests Completed 1000 requests Finished 1000 requests Server Software: Apache/2.2.23 Server Hostname: localhost Server Port: 80 Document Path: /home/test/ Document Length: 5 bytes Concurrency Level: 100 Time taken for tests: 25.300 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 816000 bytes HTML transferred: 5000 bytes Requests per second: 39.53 [#/sec] (mean) Time per request: 2530.037 [ms] (mean) Time per request: 25.300 [ms] (mean, across all concurrent requests) Transfer rate: 31.50 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 7 21.0 0 73 Processing: 81 2489 665.7 2500 4057 Waiting: 80 2443 654.0 2445 4057 Total: 85 2496 653.5 2500 4057 Percentage of the requests served within a certain time (ms) 50% 2500 66% 2651 75% 2842 80% 2932 90% 3301 95% 3506 98% 3762 99% 3838 100% 4057 (longest request)

    Read the article

  • Resolve local subdomain on apache for paths within user dir

    - by MaoPU
    On Apache 2.2.x I've activated mod_userdir. I used the default setup, so that http://localhost/~name/ will be connect with ~name/public_html/ and a path within public_html, e.g. ~name/public_html/mySite can be reached through http://localhost/~name/mySite. How can I achieve, that the same path can be reached through http://mySite.name.localhost/? I don't want a manual approach like it is suggested in other SF questions (such as http://serverfault.com/q/133921/53624), but rather want an automatic mapping of all available paths to the corresponding URL. I think, several steps will need to be taken: Change mod_userdir configuration, so that the subdomain of localhost will be connected with all available user names on the machine. The second step would maybe include the usage of mod_rewrite, so that the subsubdomain could be matched to the path within ~name/public_html... What would be your prefered way?

    Read the article

  • Apache will not start with mod_wsgi enabled

    - by Rox45
    I'm trying to run Apache with mod_wsgi to run Python scripts. The server is running Ubuntu 12.04 with Zend Server installed, but when I enable the wsgi module Apache will not start. I get an error message of "apache2: apr_sockaddr_info_get() failed" in the error log. I installed the module using the Debian package. I can't seem to find this specific problem anywhere so maybe it's a problem with Zend Server? I'm stumped. Thanks

    Read the article

  • Dynamic Virtual Hosts In Apache with www and non-www subdomains

    - by haukish
    I don't know apache very well and I've got a problem with configure mod_vhost_alias This is my httpd.conf file: UseCanonicalName Off LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon <Directory /var/www/sites/> Options FollowSymLinks AllowOverride All </Directory> <VirtualHost *:80> CustomLog logs/access_log.sites vcommon ServerAlias *.domain.com UseCanonicalName Off VirtualDocumentRoot /var/www/sites/%1/ </VirtualHost> Subdomains work fine without www. but I need to make them work with www too. Here's an example: something.domain.com - site is loading www.something.domain.com - Not Found What should I do?

    Read the article

  • apache front-end rewriting URL to different https ports?

    - by khedron
    Hi all, One of my users is having some trouble with forwarding to an internal web app from a public address. Everything worked fine for him when the situation was like this: front page: http://www.myexample.com/ public ref to internal app: http://www.example.com/app-8903/app.html secretly goes to: http://secret.example.com:8903/app-8903/app.html This is to say, my user is providing the very last URL, with the port information duplicated in the URL base, and they were using that to give a public face that hid both the port and the internal machine name. You could still read the port in the URL base if you looked, but the obvious reference and machine name were hidden. Doing it this way, he could have several different instances of the application running on secret.example.com with different ports, and on the front end it just looked like it was changing the URL directory/base. Now the user wants to do the same thing over https:, and the people helping him with apache config say it can't be done. Is that so? Without being there to tinker with the configuration myself, I'm not sure what his IT people have tried, but reading through the apache2 SSL FAQ and other docs, it seems like it should be possible to rewrite URLs to different ports and still use https:.

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >