Search Results

Search found 951 results on 39 pages for 'rewritecond'.

Page 10/39 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • htaccess rewrite rule loads assets twice?

    - by kristian nissen
    I am using these rules: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !\..+$ RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*+)$ /$1/ [L,R] RewriteRule !\.(js|ico|gif|jpg|png|css|html|swf|flv|xml)$ index.php But when I check resources loaded in chrome, I can see that my .css files are loaded twice.

    Read the article

  • rewrite rule for codeigniter

    - by John
    this is my controller in CI class Welcome extends Controller { function Welcome() { parent::Controller(); } function index() { } function bil($model='') { } I want to do a rewrite so that http://example.com/index.php/welcome/bil/model becomes http://example.com/model in my htaccess I have RewriteBase / RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/welcome/$1 [L] #RewriteRule ^(.*)$ /index.php/welcome/bil/$1 [L] I thought it should be as easy as removing the /index.php/welcome/ part but when I uncomment the last line it get 500 internal server error

    Read the article

  • Using mod-rewrite to conditionally select existing file in a subdirectory based on Host header?

    - by Kevin Hakanson
    I'm working through a problem where I want to select a different static content file based on the incoming Host header. The simple example is a mapping from URLs to files like this: www.example.com/images/logo.gif - \images\logo.gif skin2.example.com/images/logo.gif - \images\skin2\logo.gif skin3.example.com/images/logo.gif - \images\skin3logo.gif I have this working with the following RewriteRules, but I don't like how I have to repeat myself so much. Each host has the same set of rules, and each RewriteCond and RewriteRule has the same path. I'd like to use the RewriteMap, but I don't know how to use it to map the %{HTTP_HOST} to the path. <VirtualHost *:80> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" ServerName www.example.com ServerAlias skin2.example.com ServerAlias skin3.example.com RewriteEngine On RewriteCond %{HTTP_HOST} skin2.example.com RewriteCond %{DOCUMENT_ROOT}$1/skin2/$2 -f RewriteRule ^(.*)/(.*) $1/skin2/$2 [L] RewriteCond %{HTTP_HOST} skin3.example.com RewriteCond %{DOCUMENT_ROOT}$1/skin3/$2 -f RewriteRule ^(.*)/(.*) $1/skin3/$2 [L] </VirtualHost> The concept behind the rules is if the same filename exists in a subdirectory for that host, use it instead of the direct targeted file. This uses host based subdirectories at the lowest level, and not a top level subdirectory to separate content.

    Read the article

  • Zend Framework on a Shared Host

    - by manyxcxi
    I am trying to push my first ZF project to my shared hosting provider. I have done a lot of testing on my home server and everything is working great. My issue is that I do not know how to set up my .htaccess files on the shared hosting provider to make it work correctly. The ZF documentation says to configure my Apache config VirtualServer DocumentRoot to /whatever/path/project-folder/public, but I don't have that kind of access. How do I get around this? I have seen http://stackoverflow.com/questions/1115547/zend-framework-on-shared-hosting but none of those solutions have worked for me. My application path looks like this / - .htaccess - /application ... - /public -- .htaccess -- index.php -- ... ... My .htaccess files look like: /.htaccess RewriteEngine On RewriteRule !\.(js|gif|jpg|png|css|txt)$ public/index.php [L] RewriteCond %{REQUEST_URI} !^/public/ RewriteRule ^(.*)$ public/$1 [L] /public/.htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L]

    Read the article

  • From mod_rewrite to isapi_rewrite

    - by Ty
    Hi, I have a Modx htaccess file which needs to be rewritten from mod_rewrite to isapi_rewrite 2. Can someone please help me? The following lines need to be changed for isapi_rewrite 2: Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^.internal\ dummy\ connection.$ [NC] RewriteRule .* - [F,L] RewriteRule ^(manager|assets) - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] Many thanks.

    Read the article

  • How do I ignore a directory in mod_rewrite?

    - by eddowding
    I'm trying to have the modrewrite rules skip the directory vip. I've tried a number of things as you can see below, but to no avail. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / #RewriteRule ^vip$ - [PT] RewriteRule ^vip/.$ - [PT] #RewriteCond %{REQUEST_URI} !/vip RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress How do I get modrewrite to entirely ignore the /vip/ directory so that all requests pass directly to the folder?

    Read the article

  • Getting rewrite to work with SSL in a MVC Zend Framework app

    - by cappuccino
    I am following the Zend Framework quickstart document and got stuck on the .htaccess rewrite rules. I am using this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] This works find when I access through HTTP, however, nothing is served when accessing through HTTPS. I am using a single directory for HTTP and HTTPS content. I would not want to force HTTPS either. How can I fix this?

    Read the article

  • codeigniter problem login through IE, Safari, Chrome?

    - by kamal
    hi everyone, everything works fine in localhost but i have a problem login from other browsers like safari and chrome, in firefox its ok. may be it is because of htaccess or may be other. i tried a lot searching but come to no solution. my htaccess file look like this. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 /index.php </IfModule> my server folder hirarchy looks like this public_html L application system css images .htaccess application/config/config.php looks like this $config['index_page'] = "index.php?"; $config['uri_protocol'] = 'QUERY_STRING'; any help?

    Read the article

  • Zend Server CE Apache mod_rewrite REQUEST_FILENAME SCRIPT_FILENAME Problem

    - by liumiuyong
    Hi,there! I use this .htaccess file in a project: RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] It works well in Apache 2.2 Recently I started to use Zend Server CE , the ReWrite Rule didn't work ! And this works: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] This is what Apache's document say: The variables SCRIPT_FILENAME and REQUEST_FILENAME contain the same value - the value of the filename field of the internal request_rec structure of the Apache server. The first name is the commonly known CGI variable name while the second is the appropriate counterpart of REQUEST_URI (which contains the value of the uri field of request_rec). Anyone can figure out why? Appreciate!

    Read the article

  • .htaccess wildcard problem

    - by niggles
    I've come across a problem with an .htaccess rule I can't sort out. It works on my MAMP stack and it works on 3 other servers, but it won't work on a particular server and keeps giving me a "500 error with an additional 302 error". It's the wildcard that's throwing it and from Google research it says it may be because of an infinite loop, but it works on other servers just fine. The site in question is being developed in a sub-directory, but then again, so have the other sites: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^$ public/ [L] RewriteRule (.*) public/$1 [L] /public has it's own .htaccess file that is: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?url=$1 [PT,L] Any suggestions as mod_rewrite's not my specialty and I can't seem to fix this.2

    Read the article

  • Codeigniter .htaccess not working in subdirectory

    - by xzdead
    I have this codeingniter project structure webRoot | |/application | | | |/controllers | | | |/admin | |/public | | | |/admin | | | | | |/css | | |/img | |/css | |/img And this is my .htacess file, located in /public. I use this in every local project running xampp: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> <IfModule !mod_rewrite.c> # If we don't have mod_rewrite installed, all 404's # can be sent to index.php, and everything works as normal. # Submitted by: ElliotHaughin ErrorDocument 404 /index.php </IfModule> It works fine in localhost, but doesn't work in a dreamhost server. I always get "no input file specified". So after searching the web and trying lots of combinations, the best I got is this .htaccess file: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] With this one, if I go to http://development.mydomain.com - I see the codeigniter welcome page But if I go to: http://development.mydomain.com/admin - I see the directory listing of /public/admin and doesn't execute the controller in /application/controllers/admin Again, if I go to: http://development.mydomain.com/admin/admin - I see the private area, it executes the controller and goes to the default controller defined in routes, "dashboard" This works fine too: http://development.mydomain.com/admin/dashboard I have set in my config file: $config['index_page'] = ''; $config['base_url'] = ''; $config['uri_protocol'] = 'AUTO'; I think that whatever is wrong in my .htaccess is causing other path issues I have with my project. Any help would be great. Thanks to all in advance EDIT: I removed this line: RewriteCond %{REQUEST_FILENAME} !-d because admin directory exists, that's why I see the public directory listing. But now I see the codeigniter welcome page when I go to http://development.mydomain.com/admin So now my .htaccess file looks like: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] #RewriteRule ^(.*)$ /index.php?/$1 [L] I also tried with the commented RewriteRule but I get the same result.

    Read the article

  • Convert Apache Htaccess rules to Lighttpd, Please help

    - by Vineet
    Hi... I want to convert the following .htaccess rules to lighttpd. Can anyone please help me ? DirectoryIndex index.php RewriteEngine On #RewriteBase /your-sub-directory RewriteRule ^index.php/rewrite-test index.php/rewrite-pass [L] RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L] Thanks!

    Read the article

  • How to remove "index.php?" from HTACCESS [duplicate]

    - by Francis Goris
    This question already has an answer here: Reference: mod_rewrite, URL rewriting and “pretty links” explained 2 answers I have url like this: www.site.com/index.php?/genero/aventura/av/ But I would like this to be my new url: site.com/genero/aventura/av/ I used the following code: <IfModule mod_rewrite.c>RewriteEngine On RewriteCond %{HTTP_HOST} !^www.site.com/$ [NC] RewriteRule ^index.php\?/(.*)$ site.com/$1 [R=301,L] </IfModule> but only returns me: site.com/index.php?/genero/aventura/av/ This is my latest & full version: RewriteEngine on #RewriteCond $1 !^(index\.php|ver_capitulo\.html|google3436eb8eea8b8d6e\.html|BingSiteAuth\.xml |portadas|public|mp3|css|favicon\.ico|js|plantilla|i|swf|plugins|player\.swf|robots\.txt) RewriteCond $1 !^(index\.php|public|css|js|i|feed|portadas|robots\.txt|BingSiteAuth\.xml|plugins|i|mp3|favicon\.ico|pluginslist\.xml|google3436eb8eea8b8d6e\.html) RewriteRule ^(.*)$ /index.php?/$1 [L] #DirectoryIndex index.php #RewriteCond %{THE_REQUEST} http://www.page.com/index\.php [NC] #RewriteRule ^(.*?)index\.php$ http://page.com/$1 [L,R=301,NC,NE] #DirectoryIndex index.php #RewriteEngine On Thanks for reading.

    Read the article

  • How does this mod_rewrite code resolve properly?

    - by user532493
    My .htaccess file is as follows: Options -Multiviews RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php It works, but I'm wondering how it works. For example, if I type in example.com/main, I get the file at www.example.com/main.php. How do I get the .php extension if the code tells the rewriting to stop after adding the www. to the beginning of example.com?

    Read the article

  • why this httaccess code results into a redirect loop?

    - by user3606997
    Here I am stuck with my htaccess code. I have been trying to figure it out for the last 11 hours why am I getting a redirect loop for the below code. Options -Indexes +FollowSymLinks RewriteEngine on #Check for no www or www RewriteCond %{HTTP_HOST} ^dummysite.com$ [or] RewriteCond %{HTTP_HOST} ^www.dummysite.com$ [NC] RewriteRule . - [E=FIRSTPART:true] # IE 6 RewriteCond %{HTTP_USER_AGENT} !MSIE\s6 RewriteCond %{ENV:FIRSTPART} true RewriteRule ^(.*)$ https://www.dummysite.com/$1 [R=302,L] Why the above code results into a redirect loop? EDIT: What I actually want is that if the user is from IE6 then he should be redirected to http version with www as prefix no matter if he types www or not in the url. And on the other hand if the user is from any other browsers then he should be redirected to a https version with www as prefix no matter if he types www in the url or not.

    Read the article

  • WordPress 2.9.2 htaccess curruption issue strikes again (in Patched site)

    - by Scott B
    The htaccess file below crashed the site with an internal server error (500). This site has the misc.php patch that's discussed here: Wordpress Bug #11903 Apparently something else is at play here or the patch is not fully addressing the issue. 3 sites went down yesterday. 2 today (so far). All sites have the patch file that's referenced in the bug track link above. AuthName mysite.net AuthUserFile /home/mysite/public_html/_vti_pvt/service.pwd AuthGroupFile /home/mysite/public_html/_vti_pvt/service.grp Options All -Indexes # BEGIN WordPress # BEGIN WordPress root <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress root dule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress root

    Read the article

  • How can i get my htaccess to work (subdomains)?

    - by user358994
    I'm sorta a noob at these things but I'm trying to make a simple virtual subdomain with .htaccess. I have wildcard enabled and after lots of digging, this is what I've come up with: rewriteEngine On rewriteCond %{HTTP_HOST} !^$ rewriteCond %{HTTP_HOST} !^(www\.)?khpedia\.com$ [NC] rewriteCond %{HTTP_HOST}<->%{REQUEST_URI} ^(www\.)?([^.]+).*<->/([^/]+) [NC] rewriteCond %2<->%3 !^(.*)<->\1$ [NC] rewriteRule ^(.+) /%2/$1 [L] My directory is setup as -root --wiki ----index.php --test Right now when I travel to wiki.khpedia.com, I get a page not found. When I travel to wiki.khpedia.com/index.php, it travels to wiki.khpedia.com/wiki/index.php. I am somehow also able to access wiki.khpedia.com/test. If it doesnt seem obvious yet, I want to be able to go to wiki.khpedia.com/index.php and see wiki.khpedia.com/wiki/index.php but not in my address bar. Sorry for the text block and thanks for the help.

    Read the article

  • rewrite condition for directory along with file

    - by RHR
    Any one please help me.I am new to .htaccess I want to check the following condition RewriteCond : IF !index.html AND !app/facebookapp/{[a-zA-Z0-9-/]}.html RewriteRule : ..... My code is RewriteCond %{REQUEST_URI} !index\.html RewriteCond %{REQUEST_URI} app/facebookapp/^([a-zA-Z0-9-/]+).html$ RewriteRule ...... its not working And one more question if the request url is header.html RewriteCond %{REQUEST_URI} header.html$ RewriteRule ^([a-zA-Z0-9-/]+).html$ position.php?position=$1 [L] $l will return header. if the request url is app/facebookapp/header.html we write the same above condition $l will return app/facebookapp/header.my question is how to get only the filename ?? thanks

    Read the article

  • Blocking 'good' bots in nginx with multiple conditions for certain off-limits URL's where humans can go

    - by Glenn Plas
    After 2 days of searching/trying/failing I decided to post this here, I haven't found any example of someone doing the same nor what I tried seems to be working OK. I'm trying to send a 403 to bots not respecting the robots.txt file (even after downloading it several times). Specifically Googlebot. It will support the following robots.txt definition. User-agent: * Disallow: /*/*/page/ The intent is to allow Google to browse whatever they can find on the site but return a 403 for the following type of request. Googlebot seems to keep on nesting these links eternally adding paging block after block: my_domain.com:80 - 66.x.67.x - - [25/Apr/2012:11:13:54 +0200] "GET /2011/06/ page/3/?/page/2//page/3//page/2//page/3//page/2//page/2//page/4//page/4//pag e/1/&wpmp_switcher=desktop HTTP/1.1" 403 135 "-" "Mozilla/5.0 (compatible; G ooglebot/2.1; +http://www.google.com/bot.html)" It's a wordpress site btw. I don't want those pages to show up, even though after the robots.txt info got through, they stopped for a while only to begin crawling again later. It just never stops .... I do want real people to see this. As you can see, google get a 403 but when I try this myself in a browser I get a 404 back. I want browsers to pass. root@my_domain:# nginx -V nginx version: nginx/1.2.0 I tried different approaches, using a map and plain old nono if's and they both act the same: (under http section) map $http_user_agent $is_bot { default 0; ~crawl|Googlebot|Slurp|spider|bingbot|tracker|click|parser|spider 1; } (under the server section) location ~ /(\d+)/(\d+)/page/ { if ($is_bot) { return 403; # Please respect the robots.txt file ! } } I recently had to polish up my Apache skills for a client where I did about the same thing like this : # Block real Engines , not respecting robots.txt but allowing correct calls to pass # Google RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5\.0\ \(compatible;\ Googlebot/2\.[01];\ \+http://www\.google\.com/bot\.html\)$ [NC,OR] # Bing RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5\.0\ \(compatible;\ bingbot/2\.[01];\ \+http://www\.bing\.com/bingbot\.htm\)$ [NC,OR] # msnbot RewriteCond %{HTTP_USER_AGENT} ^msnbot-media/1\.[01]\ \(\+http://search\.msn\.com/msnbot\.htm\)$ [NC,OR] # Slurp RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5\.0\ \(compatible;\ Yahoo!\ Slurp;\ http://help\.yahoo\.com/help/us/ysearch/slurp\)$ [NC] # block all page searches, the rest may pass RewriteCond %{REQUEST_URI} ^(/[0-9]{4}/[0-9]{2}/page/) [OR] # or with the wpmp_switcher=mobile parameter set RewriteCond %{QUERY_STRING} wpmp_switcher=mobile # ISSUE 403 / SERVE ERRORDOCUMENT RewriteRule .* - [F,L] # End if match This does a bit more than I asked nginx to do but it's about the same principle, I'm having a hard time figuring this out for nginx. So my question would be, why would nginx serve my browser a 404 ? Why isn't it passing, The regex isn't matching for my UA: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.30 Safari/536.5" There are tons of example to block based on UA alone, and that's easy. It also looks like the matchin location is final, e.g. it's not 'falling' through for regular user, I'm pretty certain that this has some correlation with the 404 I get in the browser. As a cherry on top of things, I also want google to disregard the parameter wpmp_switcher=mobile , wpmp_switcher=desktop is fine but I just don't want the same content being crawled multiple times. Even though I ended up adding wpmp_switcher=mobile via the google webmaster tools pages (requiring me to sign up ....). that also stopped for a while but today they are back spidering the mobile sections. So in short, I need to find a way for nginx to enforce the robots.txt definitions. Can someone shell out a few minutes of their lives and push me in the right direction please ? I really appreciate ANY response that makes me think harder ;-)

    Read the article

  • Mod_Rewrite Apache ProxyPass ?

    - by Anon
    I have two websites; OLDSITE and NEWSITE. The OLDSITE has 120 IP Address that it has with it, and the NEWSITE had 5. I want to be able to separate everything from OLDSITE and NEWSITE so they are not tied together but use them on the same linux computer. My current apache setup is this: Listen 80 NameVirtualHost * <VirtualHost *> ServerName oldsite.com ServerAdmin [email protected] DocumentRoot /var/www/ <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} ^([^.]+)\.oldsite\.com$ RewriteCond /home/%1/ -d RewriteRule ^(.+) %{HTTP_HOST}$1 RewriteRule ^([^.]+)\.oldsite\.com/media/(.*) /home/$1/dir/media/$2 RewriteRule ^([^.]+)\.oldsite\.com/(.*) /home/$1/www/$2 </VirtualHost> <VirtualHost newsite.com> ServerName newsite.com ServerAdmin [email protected] DocumentRoot /var/newsite/ <Directory /var/newsite/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} ^([^.]+)\.newsite\.com$ RewriteCond /home/%1/ -d RewriteRule ^(.+) %{HTTP_HOST}$1 RewriteRule ^([^.]+)\.newsite\.com/media/(.*) /home/$1/dir/media/$2 RewriteRule ^([^.]+)\.newsite\.com/(.*) /home/$1/www/$2 </VirtualHost> <VirtualHost *> ServerName panel.oldsite.com ProxyPass / http://panel.oldsite.com:10000/ ProxyPassReverse / http://panel.oldsite.com:10000/ <Proxy *> allow from all </Proxy> </VirtualHost> <VirtualHost *> ServerName panel.newsite.com ProxyPass / http://panel.newsite.com:10000/ ProxyPassReverse / http://panel.newsite.com:10000/ <Proxy *> allow from all </Proxy> </VirtualHost> I want to be able to access anything that is newsite.com and have it go to the /var/newsite unless their is a home directory...and then if its panel.newsite.com I want it to automatically do a proxypass to panel.newsite.com:10000... With this setup, it works perfect for oldsite.com.... both the proxy and the webpages... However, having the Virtualhost set to newsite.com renders the proxypass worthless. If I change the Virtualhost for the newsite.com to a wildcard, the proxypass will work but anything thats a subdomain of newsite.com won't work. so newsite.com will work, but www.newsite.com will not load correctly. I am assuming that when everything is wildcarded, then the ServerName somewhat acts like a RewriteCond and actually just applies the stuff to that URL. It uses the Virtualhost * (oldsite.com) and lets ANYTHING.oldsite.com work, but the second virtualhost * (newsite.com) only newsite.com will work... www.newsite.com will not. If I change the order of them, the opposite is true. So apparently it doesn't like me using 2 wildcards... I tried just making the Servername *.newsite.com .......but that would be too easy. I am not sure what I can do to do what I want? Perhaps I should make the ProxyPass included in the VirtualHosts and use something like: RewriteCond %{HTTP_HOST} ^panel\.newsite\.com$ [NC] RewriteRule ^(.*)$ http://panel.newsite.com:10000/ [P] ProxyPassReverse / http://panel.newsite.com:10000/ but that doesnt seem to want to login to webmin, it loads the login page but isnt working how the ProxyPass & ProxyPassReverse does.

    Read the article

  • apache rewriting url doesn't work(using godaddy hosting)

    - by AzizAG
    I'm using a framework to create my website(codeigniter) by default the urls are like this:mysite.com/index.php?/etc/etc/etc. And I'm trying to remove the index.php?, I tried to remove it by doing this(didn't work): RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?$1 [L] Note: it's working on my localhost(when putting my website's files in the root directiory). So, Is this issue associated with me or the hosting company(Go Daddy)?

    Read the article

  • htaccess redirect problem

    - by jimbo
    Hi all, I am currently building a site and want to hide all development work on the site. I am using a htaccess file and redirecting to my holding page index.php?id=7: Options +FollowSymlinks RewriteCond %{REQUEST_URI} !/index.php RewriteCond %{REQUEST_URI} !/assets/ RewriteRule $ /index.php?id=7 [R=307,L] This is working for pretty much all pages, but, changing index.php?id=7 to another number id=6 for example still shows the page with no redirect. Any help welcome...

    Read the article

  • Mod Rewrite - url rewriting

    - by modrewriteNewbie
    I am very new to mod rewrite. I need to redirect any user with "citzenhawk" parameter in their url to my url for example http://www.mywebsite.com/?sc=CX12N003&cm_mmc=affiliate--citizenhawk--nooffer-_-na&prfc=5&clickid=0004c845fa9a87050a4277221a003262 should result into http://www.mywebsite.com/ Here are my rewrite conditions: RewriteCond %{QUERY_STRING} (&|^)cm_mmc=(.)citizenhawk(.)(&|$)$ RewriteRule ^/rrs/ [NC,R=302,L] Where am I going wrong? Is my RewriteCond wrong?

    Read the article

  • .htaccess - lose the file .html extension

    - by Darren Sweeney
    I'm having a bad .htaccess day! I want a user to be able to type the URL mysite.com/about instead of mysite.com/about.html On .htaccess file I have: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^/(.*)$ /$1.html [NC,L] But this simply does not work? I will add though that if i try this further inside the site e.g. mysite.com/pages/contact Works perfectly whether I have the above code in the .htaccess or not What am I doing wrong?

    Read the article

  • redirecting in node.js behind mod_rewrite proxy

    - by chmanie
    I have a node.js application running behind an Apache mod_rewrite proxy configured in a .htaccess file like this: RewriteCond %{HTTP_HOST} =mydomain.com [OR] RewriteCond %{HTTP_HOST} =www.mydomain.com RewriteRule (.*) http://localhost:3000/$1 [QSA,P] When I now do a redirect (e.g. express' res.redirect()) inside my node.js application (which runs on port 3000), the user is always redirected to http://localhost:3000/ (which is in fact exactly what is defined above but not the desired behaviour). Is there any way around this?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >