Search Results

Search found 3190 results on 128 pages for 'isapi rewrite'.

Page 16/128 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • mod rewrite and automatic redirection

    - by Klemen
    Hello! I have this rule written in my .htaccess RewriteRule ^blog/([0-9]+)/? /obdelaj.php?ime=$1 which works but it redirects me to example.com/obdelaj.php?ime=# and i want the user to stay on example.com/blog/# I have a hostgator account and i dont have access to the httpd file , and i presume that a some configuration in httpd file is causing this, because on my localhost machine this work just fine. So what would i have to add to the .htaccess to overwrite this automatic redirection? Thank you

    Read the article

  • Problem with mod rewrite for multi-lingual site

    - by Chris
    Hi everyone Currently developing a multi-lingual website, Users can access the front page using url with format below: http://mydomain.com/en/ http://mydomain.com/fr/ Problem is here. URL without last "/" (http://mydomain.com/fr) caused page not found problem Here is the rule RewriteRule ^/?([^./]+)/(.*)$ $2?lang=$1 [L,QSA] Can anybody help ? Thanks in advance

    Read the article

  • ReWrite Rules Issue

    - by Jacob Clark
    I seem to be having an issue with my Apache Rewrites RewriteEngine on RewriteBase / RewriteRule ^wordpress/?$ / [NC,L,R=301] RewriteRule ^/$ wordpress/ [NC,L] I simply need to remove /wordpress from the URL as I have pages within Wordpress I want to be seen as the main directory At the moment the urls are domain.com/wordpress/blog I'd rather not have /wordpress, rather domain.com/blog Any help?

    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

  • Apache Mod Rewrite question

    - by ezlem
    I am not really familiar with apache modrewrite I have url parameters such as {domain}/index.php?blog=5 i simply want to make it {domain}/home.php?client=5 Is it a task as simple as it sounds and can anyone help ?

    Read the article

  • rewrite rule to skip folder [closed]

    - by redcoder
    RewriteEngine on RewriteBase /tradesalvage/demo RewriteRule ^featured-cars/?$ index.php [L] RewriteRule ^current-stock/?$ carlist.php [L] RewriteRule ^about-us/?$ aboutus.php [L] ErrorDocument 500 /tradesalvage/demo/500.php ErrorDocument 404 /tradesalvage/demo/404.php I have the above rule in .htaccess when access url "http://localhost/tradesalvage/demo/about-us" , it does redirect to aboutus.php file .It also works fine with the rest of the rule. But i have a problem when i create a admin folder.WHen access "http://localhost/tradesalvage/demo/admin/add-data" , it goes to the 404 error page.How do I write the rule to skip the admin folder ?

    Read the article

  • Debugging nginx URL rewrite: How do I figure out where the problem is?

    - by pjmorse
    I have a specific URL pattern on a site which needs to be redirected to the HTTPS version. This is a Django site; Nginx checks each URL in memcached, and if it doesn't find a cached version it proxies the request to Apache/mod_python for Django to render the page. The relevant configuration block is rewrite ^/certificate https://mysite.com/certificate ; rewrite ^/([a-zA-Z]{2})/certificate https://mysite.com/certificate ; ...and it doesn't appear to be working at all. Nginx is: $ nginx -V nginx version: nginx/0.7.65 built by gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4) TLS SNI support disabled configure arguments: --prefix=/usr/local/nginx --pid-path=/var/run/nginx.pid --with-http_gzip_static_module --with-http_ssl_module How can I figure out if the problem is my patterns not matching, or a more obscure configuration problem? (The site is localized to three languages, and the localization is in the URL string, e.g. /US/news/, /DE/about, etc. It tracks localization in the session as well, defaulting to US, so if you just requested /news Django will rewrite to /US/news unless the user has a cookie indicating they're using a different localization. Django handles this, though, not Nginx.)

    Read the article

  • IIRF redirect combine rules?

    - by Phill
    I have 3 "rules". One to make sure URLs are lowercase another to include a slash at the end of directories, and a 3rd to force access to index.html pages to be thru the directory instead. The problem w/ how I have it is, sometimes this is causing multiple 301 redirects. I'd really like each rule to apply in turn and then if neccessary redirect once to the final url. For example a url might need to be converted to lowercase and have a slash added. Or may need to be lowecase and change from index.html to a directory. Any ideas how I can do this? Thanks very much. The rules are below: #LOWERCASE URLS For Directories, aspx, html files RedirectRule ^/(.*[A-Z].*(/|\.html|\.aspx))$ /#L$1#E [R=301] #ADD SLASH TO DIRECTORIES #--------------------------------------------- #Perm Redirect If: #Starts w/ Forward Slash #Match Any Characters Except (. or ?) 1 or more times #End w/ someting besides a dot, ?, or slash #If So, Perm Redirect captured piece W/ Slash At End and at front RedirectRule ^/([^.?]+[^.?/])$ /$1/ [I,R=301] #CHANGE INDEX.HTML REQUESTS TO DIRECTORY REQUESTS #--------------------------------------------- RedirectRule ^/(.*)/index\.html$ /$1/ [I,R=301]

    Read the article

  • web site in pure php with clean url

    - by Testadmin
    Hi I have enabled mod_rewrite in my Xampp apache. When I run my php info page, I saw mod_rewrite under Loaded Modules. So I think it's enabled. Then I create a folder clean-url under htdocs. Inside clean-url folder I have 3 files 1) index.php here I put Welcome 2) Test. php 3) .htaccess Here I put RewriteEngine On RewriteRule ^([a-z]+)/([a-z-]+)$ /$1/$2.php [L] I want to run the index page, and by clicking on that hyper link I want to display the test.php page with URL mydomain/clean-url/test I know I am in a wrong path. Does any one help me? Or correct me? ALso i don't know any idea about url rewriting and .htaccess. Please help me.

    Read the article

  • Old mod_rewrite (htaccess) rule still applies

    - by Blake
    I had a rule in the .htaccess file in my root directory that said: RewriteCond ^(.*)$ $1.php I've completely rewritten the file since then, and the rule is still being applied. I tried restarting the Apache server and the physical server with no luck. I've also scoured the directory and there are no other .htaccess files in there or any subdirectories. Does anyone know what might be causing something like this to happen?

    Read the article

  • Web.config WordPress rewrite rules next to Magento

    - by Flo
    I've installed Magento on IIS in folder: E:\mydomain\wwwroot (I already have it all running correctly). I have no deeper folder magento, I placed all files directly in the wwwroot folder, so: wwwroot\app wwwroot\downloader wwwroot\errors wwwroot\includes etc... UPDATE: since I'm on IIS my .htaccess is ignored completely and my web.config rules are used instead. Here's my web.config in folder e:\mydomain\wwwroot: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Magento SEO: remove index.php from URL"> <match url="^(?!index.php)([^?#]*)(\\?([^#]*))?(#(.*))?" /> <conditions> <add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" /> <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:0}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> Next, I wanted to install WordPress. I unzipped all files in folder e:\mydomain\wwwroot\wordpress Browsed to www.mydomain.com/wordpress/wp-admin/install.php, where I configured everything for my database. Everything was installed correctly. I then navigate to http://www.mydomain.com/wordpress/wp-login.php where I type my credentials. I seem to be logged in and am redirected to http://www.mydomain.com/wordpress/wp-admin/ But there I receive an empty page. I enabled detailed error message in IIS following this article: http://www.iis.net/learn/troubleshoot/diagnosing-http-errors/how-to-use-http-detailed-errors-in-iis I also checkec with Fiddler and see that I receive a 500 error: GET /wordpress/wp-admin/ HTTP/1.1 Host: www.mydomain.com Connection: keep-alive Cache-Control: max-age=0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36 Referer: http://www.mydomain.com/wordpress/wp-login.php Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8,nl;q=0.6 Cookie: wordpress_fabec4083cf12d8de89c98e8aef4b7e3=floran%7C1381236774%7C2d8edb4fc6618f290fadb49b035cad31; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_fabec4083cf12d8de89c98e8aef4b7e3=floran%7C1381236774%7Cbf822163926b8b8df16d0f1fefb6e02e HTTP/1.1 500 Internal Server Error Content-Type: text/html Server: Microsoft-IIS/7.5 X-Powered-By: PHP/5.4.14 X-Powered-By: ASP.NET Date: Sun, 06 Oct 2013 12:56:03 GMT Content-Length: 0 My WordPress web.config in folder e:\mydomain\wwwroot\wordpress contains: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="wordpress" patternSyntax="Wildcard"> <match url="*"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> </conditions> <action type="Rewrite" url="index.php"/> </rule></rules> </rewrite> </system.webServer> </configuration> I also want my WordPress articles to be available on www.mydomain.com/blog instead of www.mydomain.com/wordpress Ofcourse my admin links for Magento and Wordpress should also work. How can I configure my web.config files to achieve the above?

    Read the article

  • It it possible to have multiple ReWrite rules that all do the same Action, for an IIS7.5 webserver?

    - by Pure.Krome
    I've got rewrite module working great for my IIS7.5 site. Now, I wish to add a number of urls that all goto an HTTP 410-Gone status. Eg. <rule name="Old Site = image1" patternSyntax="ExactMatch" stopProcessing="true"> <match url="image/loading_large.gif"/> <match url="image/aaa.gif"/> <match url="image/bbb.gif"/> <match url="image/ccc.gif"/> <action type="CustomResponse" statusCode="410" statusReason="Gone" statusDescription="The requested resource is no longer available" /> </rule> but that's invalid - the website doesn't start saying there's a rewrite config error. Is there another way I can do this? I don't particularly want define a single URL and ACTION for each url.

    Read the article

  • Rewrite rule to redirect all subpages to a single page?

    - by user784637
    I have two two files /etc/apache2/sites-available/foo and /etc/apache2/sites-available/foo_maintenance The rewrite rule I use in /etc/apache2/sites-available/foo is <Directory /var/www/public_html> Options +FollowSymlinks RewriteOptions inherit RewriteEngine on # RewriteCond %{HTTP_HOST} ^mysite\.com [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L] </Directory> so that all mysite.com/* redirect to www.mysite.com After I take my site down for maintenance, if the user is navigates to a subpage of the site like mysite.com/subdir/something.php I would like to redirect them to www.mysite.com so the index.html of the maintenance page would be displayed. What is the rewrite rule to redirect all traffic from any subpage to www.mysite.com?

    Read the article

  • Is it possible to rewrite some query strings to HTTPS and keep everything else on HTTP?

    - by Matt
    I'm rewriting query strings to pretty URIs, example: index.php?q=/en/contact becomes /en/contact and all works nicely.. # httpd.conf # HANDLE THE QUERY RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] Is it even possible to rewrite single queries to force https and force everything else onto http? I've tried many different approaches that typically end in infinate loops. I could write a plugin to do this in PHP but figured it would be more effecient to handle this in the server conf. I'd be greatful for any advice. EDIT: To clarify, I'd like to be able to rewrite the non SSL http://example.com/index.php?q=/en/contact to the SSL enabled https://example.com/en/contact and every query that is not /en/contact get written to http://example.com/...

    Read the article

  • How to rewrite using htaccess if the file exists in another folder?

    - by Jack
    We are trying to rewrite to another folder if the file does not exist in the document root, but does exist in the other folder. The other folder is in a completely different location, which is located using "Alias" in the vhosts. So, what we have so far (from this post How to rewrite URI from root if file exists in folder?) is: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/legacy/ RewriteRule ^(.*)$ legacy/$1 [QSA,L] This works to an extent, but seems to direct everything to the legacy folder, not just when the file doesn't exist in the first location and does exist in legacy. Thanks in advance for any help, Jack.

    Read the article

  • NGINX rewrite rules help. Redirect not working and want to get rid of index.php in urls

    - by Tamerax
    hey! I have 2 questions for nginx users. 1) I'm trying to setup my joomla server onto my new linode running NGINX and after much (like days) of searching and testing, I finally have a config that works with with SEF url plugins...sorta. I was using an apache system on the old server and it used mod_rewrite and life was fine in terms of SEF. Since NGINX doesn't have mod_rewrite, I found something that works BUT it constantly leaves index.php in the urls. ex: http://mysite.com/index.php/forum i want it to be just http://mysite.com/forum but without mod_rewrite it doesn't seem to be possible in joomla that i'm aware of. I know in wordpress it IS possible but I have to use a plugin. Here is my config file: server { listen 80; server_name mysite.com www.mysite.com; access_log /home/public_html/mysite.com/log/access.log; error_log /home/public_html/mysite.com/log/error.log; root /home/public_html/mysite.com/public/; large_client_header_buffers 4 8k; # prevent some 400 errors index index.php index.html; fastcgi_index index.php; location / { expires 30d; error_page 404 = @joomla; log_not_found off; } # Rewrite location @joomla { rewrite ^(.*)$ /index.php?q=last; } # Static Files location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ { access_log off; expires 30d; } # PHP location ~ \.php { keepalive_timeout 0; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include /usr/local/nginx/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME /home/public_html/mysite.com/public /$fastcgi_script_name; } } 2) second question should be easy but i can't get it to work. I want to use the same config I posted above and have either mysite.com or www.mysite.com both forward to mysite.com/portal. Basically when you hit up the front page with or without the www, it all gets forwarded to a sub directory on the server I called Portal. I have tried several variations of: rewrite ^/(.*) http://www.example.com/portal/$1 permanent; but it usually ends with firefox telling me there is some crazy loop happening the address bar saying something like mysite.com/portalportalportalportalportal.........on and on. So, any help on either of these issues would be awesome!! Thanks!!

    Read the article

  • Transparently rewrite requests to a subdomain.

    - by ptrin
    I would like to rewrite requests to http://www.mysite.com/foo to http://foo.mysite.com without the user's address bar changing. Using IIRF I can do the rewrite, but only if I use the [R] modifier flag which makes the rewrite a redirect. Is there a way for me to transparently rewrite requests to a subdomain? Here's the rewrite rule I've been testing with: RewriteRule ^/foo/(.*)?$ http://foo.mysite.com/index.html?$1 [R,L]

    Read the article

  • Nginx rewrites - When does one use the break flag (pattern target break)?

    - by anonymous-one
    The nginx wiki states: break - completes processing of current rewrite directives and non-rewrite processing continues within the current location block only. Is this to say that: If the rewrite pattern matches, process the rewrite (rewrite to target) but do not process any of the other rules in the location block, and process all other (cache, proxy, etc) directives in the location block? I am talking about the break flag as per: PATTERN TARGET FLAG Not the "break;" directive. Thanks.

    Read the article

  • When to give in and start The Big Rewrite?

    - by John Cromartie
    I've had my share of projects where the first thing I think is "let's just rewrite it in ." Everybody feels the urge at some point. In fact, I think I've had the urge to rewrite pretty much every project I've ever been on. However, it is accepted wisdom that a total rewrite is generally a bad idea. The question is: when do you look at a project and say: "OK, it's time to start over." What sort of metrics or examples can you cite of where a rewrite was truly necessary? How bad does the code have to be? How old can a project get before there too much invested?

    Read the article

  • Apache2: 400 Bad Reqeust with Rewrite Rules, nothing in error log?

    - by neezer
    This is driving me nuts. Background: I'm using the built-in Apache2 & PHP that comes with Mac OS X 10.6 I have a vhost setup as follows: NameVirtualHost *:81 <Directory "/Users/neezer/Sites/"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> <VirtualHost *:81> ServerName lobster.dev ServerAlias *.lobster.dev DocumentRoot /Users/neezer/Sites/lobster/www RewriteEngine On RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] LogLevel debug ErrorLog /private/var/log/apache2/lobster_error </VirtualHost> This is in /private/etc/apache2/users/neezer.conf. My code in the lobster project is PHP with the CodeIgniter framework. Trying to load http://lobster.dev:81/ gives me: 400 Bad Request Normally, I'd go check my logs to see what caused it, yet my logs are empty! I looked in both /private/var/log/apache2/error_log and /private/var/log/apache2/lobster_error, and neither records ANY message relating to the 400. I have LogLevel set to debug in /private/etc/apache2/http.conf. Removing the rewrite rules gets rid of the error, but these same rules work on my MAMP host. I've double-checked and rewrite_module is loaded in my default Apache installation. My http.conf can be found here: https://gist.github.com/1057091 What gives? Let me know if you need any additional info. NOTE: I do NOT want to add the rewrite rules to .htaccess in the project directory (it's checked into a git repo and I don't want to touch it).

    Read the article

  • Can mod-rewrite be used to set environmental variables?

    - by VLostBoy
    Hi, I've got an existing simple rewrite rule like so: <Directory /path> RewriteEngine on RewriteBase / # if the requested resource does not exist RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # route the uri to a front controller RewriteRule ^(.*)$ index.php/$1 [L] </Directory> This works fine, but I want to do one of either two things. On the basis of detecting the clients accept-language header, I want to either (i) Set the detected language as an environmental variable that the script can use or (ii)Rewrite the request so that the url begins with the language code (e.g. www.example.com/en/some/resource) In terms of implementing (i), I defined this rule: <Directory /path> RewriteEngine on RewriteBase / # if the requested resource does not exist RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # if the users preferred language is supported... RewriteCond %{HTTP:Accept-Language} ^.*(de|es|fr|it|ja|ru|en).*$ [NC] # define an environmental variable PREFER_LANG RewriteRule ^(.*)$ - [env=PREFER_LANG:%1] # route the uri to a front controller RewriteRule ^(.*)$ index.php/$1 [L] </Directory> I've tried a few variations, but PREFER_LANG is not defined in $_SERVER nor retrievable by getenv. In terms of implementing (ii)... lets just say its messy. I'll post it if I can't get an answer to one. Can anyone advise me? Thanks!

    Read the article

  • The Mysterious ARR Server Farm to URL Rewrite link

    Application Request Routing (ARR) is a reverse proxy plug-in for IIS7+ that does many things, including functioning as a load balancer.  For this post, Im assuming that you already have an understanding of ARR.  Today I wanted to find out how the mysterious link between ARR and URL Rewrite is maintained.  Let me explain ARR is unique in that it doesnt work by itself.  It sits on top of IIS7 and uses URL Rewrite.  As a result, ARR depends on URL Rewrite to catch the traffic...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • URL Parts available to URL Rewrite Rules

    URL Rewrite is a powerful URL rewriting tool available for IIS7 and newer.  Your rewriting options are almost unlimited, giving you the ability to optimize URLs for search engine optimization (SEO), support multiple domain names on a single site, hiding complex paths and much more. URL Rewrite allows you to use any Server Variable as conditions, and with URL Rewrite 2.0, you can also update them on the fly.  To see all variables available to your site, see this post. An understanding...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • 301 rewrite loop with a lowercase URL rule and a URL slug rule [on hold]

    - by anyvendetta
    I need to do a 301 rewrite to force all urls to become lowercase. I put in .htaccess (RewriteMap lc int:tolower in httpd.conf): RewriteCond %{REQUEST_URI} [A-Z] RewriteRule . ${lc:{REQUEST_URI}} [R=301,L] Everything works just fine except to urls with subcategories which in this case are: /category-1256-Product-page-example.html The numer 1256 refers to a “subcategory”. So when i try to access /category-1256-Product-page-example.html gives me a loop error message. I think another redirect rules are making the loop but dunno how to fix it because are just this urls rewrite rules that don't work with the above rewrite. Rewriterule ^main-site-url/category-([0-9]*)-([-_a-zA-Z0-9]*)\.html$ /subcategories.php?idcategory_main=1&idcategory=$1&category=$2 [L] Rewriterule ^main-site-url/([0-9]*)-([-_a-zA-Z0-9]*)-([0-9]*)\.html$ /file.php?idcategory_main=1&idsubcategory=$1&product=$2&idproduct=$3 [L]

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >