Search Results

Search found 4313 results on 173 pages for 'mod rewrite'.

Page 8/173 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • iis7 url rewrite (remove .aspx) and getting error 404

    - by eimeim
    I have an issue with IIS7 url rewrite module, when I add following rule I get an 404 error on all pages. <rule name="Remove .aspx" stopProcessing="true"> <match url="(.+)\.aspx" /> <action type="Redirect" redirectType="Permanent" url="{R:1}" /> All I want to do to remove all files extensions. I get lost with this, maybe someone knows the solution? Thanks in advance. Regards, eimeim

    Read the article

  • Apache to Nginx Directory Rewrite

    - by Robin
    i am shifting my webapp to nginx and i have problems to get my htaccess working In Apache I have this : RewriteRule images/([0-9]+)x([0-9]+)/([0-9]+)x([0-9]+)/(.+)$ images/image.php?width=$1&height=$2&cropratio=$3:$4&image=/$5 [L,QSA] I already tried this from a converter but with no success : rewrite /images/([0-9]+)x([0-9]+)/([0-9]+)x([0-9]+)/(.+)$ /images/image.php?width=$1&height=$2&cropratio=$3:$4&image=/$5 break; Would be nice if somebody could point me in the right direction. Thank you :)

    Read the article

  • Helicon ISAPI Rewrite is processing Rewrite Rules for httpd.conf but not .htaccess

    - by James Lawruk
    We have Helicon ISAPI Rewrite 3 installed on our Windows 2003 Web server. The RewriteRules work fine in the global file located in the httpd.conf file. The server serves several Web sites and we were hoping to create RewriteRules to apply to specific Web sites. In the IIS Properties for each Web site there exists a separate tab for ISAPI_Rewrite pointing to the .htaccess file for that Web site. No rules applied to the .htaccess files work. Any ideas why the .htaaccess files have no effect.

    Read the article

  • URL Rewrite, ServerVariables, URL Parts, HTTP to HTTPS Redirect. Week 9

    - by OWScott
    Last week I gave an intro to URL Rewrite; covering the basics and giving a real world example.  This week I dive in deeper and cover ServerVariables, the parts that make up the URL and another real world example of redirecting HTTP to HTTPS. This is week 9 of a 52 week series on various web administration related tasks.  Past and future videos can be found here. For reference, in the video I mentioned the following two blog posts: Viewing ServerVariables For a Site Parts of the URL available to URL Rewrite

    Read the article

  • Dynamically rewrite URLs upon the user's selection - is it possible?

    - by jitzo
    In my PHP based web application, there's a form that generates a URL according to the user's selection. The form has 7 different fields, each one of them affects the final URL, none of them is mandatory. The final URL can be: /field1/user_setting_of_field1/field3/user_setting_of_field3/field6/user_setting_of_field6/ or just: /field4/user_setting_of_field4 these URLs should be rewritten to- /results.php?field1=user_setting_of_field1&field3=user_setting_of_field3&field6=user_setting_of_field6 and: /results.php?field4=user_setting_of_field4 Is it possible to create a single rewrite rule that will cover these variations? I'd hate to create different rewrite rule for every possible scenario, it'll take forever... I'm currently developing the app on a Windows machine with IIS 7.5, but will eventually deploy it to an Apache server. Is it possible in both? I currently need to solve it for the IIS environment, and later on for Apache.

    Read the article

  • Using mod_rewrite to hide tomcat port

    - by user123181
    I have apps on Tomcat that use URLs like this: http://xxx:8080/myapp I don't want the users to see the port in the URL. Hi can do a rewrite rule like this: RewriteRule ^/myapp(.*) http://xxx:8080/myapp$1 [P,L] This way, if a user goes to the URL http://xxx/myapp he can enter the app fine, but the port will still show up on the browser. I want the URL that the user sees to be always http://xxx/myapp How can I do this using mod_rewrite?

    Read the article

  • Problem in apache2 with mod rewrite when setting rules in .conf files instead of .htaccess

    - by gonzlikes
    Hi, Because of weird security policies of my hosting provider I have to define my rewrite rules in /etc/apache2/conf.d/examplesite.conf instead of writing them on an .htaccess on the www folder of that site. What I'm trying to do is setup a Wordpress Mu server (http://mu.wordpress.org/forums/topic/17349 ) and so far its working on a 50%. The main blog loads perfectly but other sub blogs (located for example at www.example.com/blog2 ) don't. I'm guessing the problem is that the rewrite rules behave differently when declared at .conf files for each virtual host instead of using .htaccess files. Has anybody else had this problem? How can you fix it?

    Read the article

  • Apache mod-rewrite for shorter urls

    - by Don
    Is it possible do do something like this with mod-rewrite? Current url: www.example.com/Departments/dynamicPage.php?DeptID=10&DeptName=HR to set up a rewrite so: www.example.com/hr could redirect to the above (with the arguments)? I know I could create an "hr" folder on the root level and put in an html page with a meta refresh, but I hate the extra clutter. I don't think a .htaccess 301 is possible, but please correct me if I'm wrong. I'm looking for an elegant solution that can be added to for future instances.

    Read the article

  • Performance impact of rewrite conditions?

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

    Read the article

  • mod rewrite to remove facebook query string

    - by user905752
    I can't get my query string to work..please help... I have the following url: http://betatest.bracknell-forest.gov.uk/help?fb_action_ids=372043216205703&fb_action_types=og.likes&fb_source=aggregation&fb_aggregation_id=288381481237582 (sorry but the page will be unavailable as it is a test internal domain link) I want the following url: http://betatest.bracknell-forest.gov.uk/help I get a browser message saying 'The system cannot find the file specified.' I know it is because I already have a mod rewrite to remove the .htm from the page name to return clean urls but I don't know what I need to do to accept a clean url and return the page. Here is the mod rewrite code I have: RewriteRule ^/([\w]+)$ /$1.htm [I,L] #Any bare URL will get rewritten to a URL with .htm appended RedirectRule ^/(.+)\.(htm)$ http://betatest.bracknell-forest.gov.uk/$1 [R=301] RewriteCond %{QUERY_STRING} ^fb_action_ids=(.)$ #if the query string contains fb_action_ids RewriteCond %{QUERY_STRING} !="" #if there is a query string RewriteRule ^(.*) $1? [R=301,L] I think it is because I am using R=301 twice but do not know what I need to use as an alternative. If I append .htm from help?fb_action_ids.... to help.htm?fb_action_ids.... this returns the required page fine but I need to return the page name for the non appended url. Many thanks for any help in advance.

    Read the article

  • Nginx rewrite rule for Zimbra

    - by Yusuf
    I'm trying to write a rewrite rule for Zimbra, which will allow me to use a hostname to access the Zimbra Desktop Web UI instead of the IP address and port. The default Zimbra URLs are like this: http://127.0.0.1:port/?at=long-encrypted-user-id http://127.0.0.1:port/zimbra/?at=long-encrypted-user-id http://127.0.0.1:port/desktop/login.jsp?at=long-encrypted-user-id Here's what I have till now: server { server_name hostname; location / { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:port/; } } This only replaces http://hostname by http://127.0.0.1:port in the background; Where I'm stuck is adding the ?at=long-encrypted-user-id to the URLs. Can somebody help?

    Read the article

  • How can I enable logging for requests going through mod proxy

    - by Kariem
    Is there a way to log requests going through mod proxy? I need a way to debug my configuration, because I don't seem to be getting where I should be. I need the following information: headers of incoming requests what is being sent to the proxy target Maybe a related question: is there a way to strip some headers? I tried the following: ProxyPass /proxy/other http://not.under.my.control/ <Location /proxy/other> ProxyPassReverse / RequestHeader unset Authorization </Location> I don't really know whether this is ok, because I don't see anything. Thank you, Kariem

    Read the article

  • IIS7 URL Rewrite for URL with &rsquo;

    - by blizz
    I'm trying to redirect the following URL in IIS7 using the URL Rewrite module: Category/Cat-3/Objectives-of-Pre-Maintenance/WHAT&rsquo;S-THE-STORY-ON-LOW-CARB-DIETS-AND-EXERCISE-.aspx but for the life of me I can not get it. I tried replacing the &rsquo; with an actual single quote, and that worked fine! But for the purpose of this redirect, I need the HTML code for the quote, and not the quote itself. Here is the rule from web config: <rule name="Redirect" patternSyntax="ECMAScript" stopProcessing="true"> <match url="^Category/Cat-3/Objectives-of-Pre-Maintenance/WHAT&amp;rsquo;S-THE-STORY-ON-LOW-CARB-DIETS-AND-EXERCISE-\.aspx" /> <conditions> <add input="{HTTP_HOST}" pattern="www.example.com" /> </conditions> <action type="Redirect" url="http://www.example.com/redirecturl/" appendQueryString="false" /> </rule> Any ideas would be very helpful! Thanks

    Read the article

  • htaccess rewrite and auth conflict

    - by Michael
    I have 2 directories each with a .htaccess file: html/.htaccess - There is a rewrite in this file to send almost everything to url.php RewriteCond %{REQUEST_URI} !(exported/?|\.(php|gif|jpe?g|png|css|js|pdf|doc|xml|ico))$ RewriteRule (.*)$ /url.php [L] and html/exported/.htaccess AuthType Basic AuthName "exported" AuthUserFile "/home/siteuser/.htpasswd" require valid-user If I remove html/exported/.htaccess the rewriting works fine and the exported directory can be access. If I remove html/.htaccess the authentication works fine. However when I have both .htaccess files exported/ is being rewritten to /url.php. Any ideas how I can prevent it?

    Read the article

  • Apache rewrite rules not causes a download dialog of the PHP file

    - by Shaihi
    I have Apache 2.2.17 using the WAMPServer 2.1 installation. I am debugging a website fully local on my computer. I have the following rule in the .htaccess: # Use PHP5 Single php.ini as default AddHandler application/x-httpd-php5s .php Options +FollowSymlinks RewriteEngine on Rewritebase / RewriteRule ^bella/(.*)/(.*)$ beauty.php?beauty_id=$1 [L] RewriteRule ^(argentina|brasil|chile|colombia|espana|mexico|rep_dominicana|uruguay|venezuela|peru|bolivia|cuba|ecuador|panama|paraguay|puerto_rico)/$ country.php?name=$1 [L] RewriteRule ^(argentina|brasil|chile|colombia|espana|mexico|rep_dominicana|uruguay|venezuela|peru|bolivia|cuba|ecuador|panama|paraguay|puerto_rico)/(hi5|facebook|twitter|orkut)/$ socialnetw.php?country=$1&category=$2 [L] The problem When I enable this rule and try to access http://localhost/index.php using FF I get a download dialog for the PHP file. If I comment the Rewrite* part in the .htaccess file then the index.php file loads fine, but navigation in the page is broken...

    Read the article

  • htaccess rewrite and auth conflict

    - by Michael
    I have 2 directories each with a .htaccess file: html/.htaccess - There is a rewrite in this file to send almost everything to url.php RewriteCond %{REQUEST_URI} !(exported/?|\.(php|gif|jpe?g|png|css|js|pdf|doc|xml|ico))$ RewriteRule (.*)$ /url.php [L] and html/exported/.htaccess AuthType Basic AuthName "exported" AuthUserFile "/home/siteuser/.htpasswd" require valid-user If I remove html/exported/.htaccess the rewriting works fine and the exported directory can be access. If I remove html/.htaccess the authentication works fine. However when I have both .htaccess files exported/ is being rewritten to /url.php. Any ideas how I can prevent it?

    Read the article

  • IIS Url Rewrite Capturing query string and escaping characters

    - by LiamB
    We are just adding some redirects for an old site to a new one in IIS7 using the URL Rewrite 'plugin'. The old site's URL are all based on the query string, we'd usually do explicit rewrites like below. But this wont work in the case of the query string. <rule name="Redirect-1" patternSyntax="Wildcard" stopProcessing="true"> <match url="index.php?option=m_content&view=article&id=15&Itemid=16" /> <action type="Redirect" url="http://newurl/some-page" /> </rule> So using the 2 URL's above how can we do a 301 redirect?

    Read the article

  • I am trying to rewrite a few links with htaccess

    - by Thorpe Obazee
    I have a few URLs and I need them to be rewrite'd to the ones below: http://domain.net/blog/posts http://domain.net/blog/posts/index http://domain.net/blog/posts/view/uri/non-working-holiday http://domain.net/blog/posts/view/uri/we-no-longer-offer http://domain.net/blog/posts/view/uri/festivals http://domain.net/blog/posts/view/uri/christmas-is-just-around-the-corner http://domain.net/posts/ http://domain.net/posts/index http://domain.net/posts/view/uri/non-working-holiday http://domain.net/posts/view/uri/we-no-longer-offer http://domain.net/posts/view/uri/festivals http://domain.net/posts/view/uri/christmas-is-just-around-the-corner I was hoping that my .htaccess will fix this but it doesn't: Options +FollowSymLinks IndexIgnore */* RewriteEngine on RewriteRule ^blog\/(.*)$ posts\/$1 [NC] # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # otherwise forward it to index.php RewriteRule . index.php

    Read the article

  • Apache rewrite rule to remove index.php and direct certain areas to https

    - by Stephen Martin
    I have a codeignitor application running on Apache2, I have managed to remove the index.php from the urls with this .htaccess RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L] now I want to make certain parts of the site redirect to https, I tried this: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L] RewriteRule ^/?cpanel/(.*) https://%{SERVER_NAME}/cpanel/$1 [R,L] RewriteRule ^/?login/(.*) https://%{SERVER_NAME}/cpanel/$1 [R,L] But it doesn't work. I have to say when it comes to Apache rewrites im a noob. I can't find any tutorials on how to remove index.php and rewrite/redirect certain parts of the site to https. Any ideas, Thanks.

    Read the article

  • Ignore subdomain rewrite rules

    - by user55745
    I'm having difficulty having a sub folder act differently to the main domain in my web.config for iss. I want to prevent the sub folder from rewriting to the baselevel index.php and instead re-write to /subfolder/index.php/ I've tried this <rule name="Remove index.php for quiz" enabled="true" stopProcessing="false"> <match url="^(gsoquiz/)(.*)$" ignoreCase="false" trackAllCaptures="false" /> <conditions logicalGrouping="MatchAll"> <add input="{R:1}" negate="true" pattern="^(index\.php|admin\.php)" /> </conditions> <action type="Rewrite" url="/gsoquiz/index.php/{R:1}" /> </rule> But all I get is The page cannot be displayed because an internal server error has occurred. Any help as to where I'm going wrong would be greatly appreciated. Going mad trying to figure this out :).

    Read the article

  • Apache Mod_rewrite rule working on one server, but not another

    - by Mason
    I am using mod_jk and mod_rewrite on httpd 2.2.15. I have a rule.... RewriteCond %{REQUEST_URI} !^/video/play\.xhtml.* RewriteRule ^/video/(.*) /video/play.xhtml?vid=$1 [PT] I just want to rewrite something like /video/videoidhere to /video/play.xhtml?vid=videoidhere This works perfectly on my developer machine, but on production I get a 404 (generated by Jboss, not Apache). here is the tail of access.log and rewrite.log on prod (broken). the rewrite.log is exactly the same on dev(working) applying pattern '^/video/(.*)' to uri '/video/46279d4daf5440b2844ec831413dcc3b' RewriteCond: input='/video/46279d4daf5440b2844ec831413dcc3b' pattern='!^/video/play\.xhtml.*' => matched rewrite '/video/46279d4daf5440b2844ec831413dcc3b' -> '/video/play.xhtml?vid=46279d4daf5440b2844ec831413dcc3b' split uri=/video/play.xhtml?vid=46279d4daf5440b2844ec831413dcc3b -> uri=/video/play.xhtml, args=vid=46279d4daf5440b2844ec831413dcc3b forcing '/video/play.xhtml' to get passed through to next API URI-to-filename handler "GET /video/46279d4daf5440b2844ec831413dcc3b HTTP/1.1" 404 420 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100628 Ubuntu/10.04 (lucid) Firefox/3.6.6" I can access http://www.fivi.com/video/play.xhtml?vid=46279d4daf5440b2844ec831413dcc3b but not /video/46279d4daf5440b2844ec831413dcc3b Both server are even using the EXACT same httpd.conf, and modules. I built Apache with... ./configure --prefix /usr/local/apache2.2.15 --enable-alias --enable-rewrite --enable-cache --enable-disk_cache --enable-mem_cache --enable-ssl --enable-deflate Thanks, Mason ----UPDATE---- -mod-jk.conf JkWorkersFile /usr/local/apache2.2.15/conf/workers.properties JkLogFile /var/log/mod_jk.log JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories JkRequestLogFormat "%w %V %T" JkShmFile run/jk.shm <Location /jkstatus> JkMount status Order deny,allow Deny from all Allow from 127.0.0.1 </Location> -workers.properties worker.node1.port=8009 worker.node1.host=75.102.10.74 worker.node1.type=ajp13 worker.node1.lbfactor=20 worker.node1.ping_mode=A #As of mod_jk 1.2.27 worker.node2.port=8009 worker.node2.host=75.102.10.75 worker.node2.type=ajp13 worker.node2.lbfactor=10 worker.node2.ping_mode=A #As of mod_jk 1.2.27 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=node2,node1 worker.loadbalancer.sticky_session=True worker.status.type=status -httpd.conf ServerName www.fivi.com:80 Include /usr/local/apache2.2.15/conf/mod-jk.conf NameVirtualHost * <VirtualHost *> ServerName * DocumentRoot /usr/local/apache2/htdocs JkUnMount /* loadbalancer RedirectMatch 301 /(.*) http://www.fivi.com/$1 </VirtualHost> <VirtualHost *> ServerName www.fivi.com ServerAlias www.fivi.com images.fivi.com JkMount /* loadbalancer JkMount / loadbalancer [root@fivi conf]# /usr/local/apache2.2.15/bin/httpd -M Loaded Modules: core_module (static) authn_file_module (static) authn_default_module (static) authz_host_module (static) authz_groupfile_module (static) authz_user_module (static) authz_default_module (static) auth_basic_module (static) cache_module (static) disk_cache_module (static) mem_cache_module (static) include_module (static) filter_module (static) deflate_module (static) log_config_module (static) env_module (static) headers_module (static) setenvif_module (static) version_module (static) ssl_module (static) mpm_prefork_module (static) http_module (static) mime_module (static) status_module (static) autoindex_module (static) asis_module (static) cgi_module (static) negotiation_module (static) dir_module (static) actions_module (static) userdir_module (static) alias_module (static) rewrite_module (static) so_module (static) jk_module (shared) Syntax OK

    Read the article

  • httpd Redirect / Rewrite .com to .org

    - by David W
    I am trying to redirect a www.example.com to www.example.org. I cannot figure out what I'm doing wrong. I have ensured that mod_rewrite is enabled in httpd.conf with: LoadModule rewrite_module modules/mod_rewrite.so I further verify this by running: httpd -M and getting rewrite_module (shared) included in the results. Later in the same httpd.conf file is the VirtualHost directive where I am trying to perform the rewrite: <VirtualHost *:80> Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.org/$1 [R=301,NC,L] ServerAdmin [email protected] DocumentRoot /var/www/html ServerName example.org ServerAlias www.example.org *.example.org <Directory "/var/www/html"> Options Includes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog /var/www/logs/error_log CustomLog /var/www/logs/access_log common </VirtualHost> As we can see, we are following SymLinks in the directory (which I believe is a requirement), AND we allow All Overrides (which meets another requirement). But obviously I'm still doing something wrong. Can you spot it?

    Read the article

  • Object Not found - Apache Rewrite issue

    - by Chris J. Lee
    I'm pretty new to setting up apache locally with xampp. I'm trying to develop locally with xampp (Ubuntu 11.04) linux 1.7.4 for a Drupal Site. I've actually git pulled an exact copy of this drupal site from another testing server hosted at MediaTemple. Issue I'll visit my local development environment virtualhost (http://bbk.loc) and the front page renders correctly with no errors from drupal or apache. The issue is the subsequent pages don't return an "Object not found" Error from apache. What is more bizarre is when I add various query strings and the pages are found (like http://bbk.loc?p=user). VHost file NameVirtualHost bbk.loc:* <Directory "/home/chris/workspace/bbk/html"> Options Indexes Includes execCGI AllowOverride None Order Allow,Deny Allow From All </Directory> <VirtualHost bbk.loc> DocumentRoot /home/chris/workspace/bbk/html ServerName bbk.loc ErrorLog logs/bbk.error </VirtualHost> BBK.error Error Log File: [Mon Jun 27 10:08:58 2011] [error] [client 127.0.0.1] File does not exist: /home/chris/workspace/bbk/html/node, referer: http://bbk.loc/ [Mon Jun 27 10:21:48 2011] [error] [client 127.0.0.1] File does not exist: /home/chris/workspace/bbk/html/sites/all/themes/bbk/logo.png, referer: http://bbk.$ [Mon Jun 27 10:21:51 2011] [error] [client 127.0.0.1] File does not exist: /home/chris/workspace/bbk/html/node, referer: http://bbk.loc/ Actions I've taken: Move Rewrite module loading to load before cache module http://drupal.org/node/43545 Verify modrewrite works with .htaccess file Any ideas why mod_rewrite might not be working?

    Read the article

  • Apache rewrite rules and special characters

    - by Massimo
    I have a server where some files have an actual %20 in their name (they are generated by an automated tool which handles spaces this way, and I can't do anything about this); this is not a space: it's "%" followed by "2" followed by "0". On this server, there is an Apache web server, and there are some web pages which links to those files, using their name in URLs like http://servername/file%20with%20a%20name%20like%20this.html; those pages are also generated by the same tool, so I (again!) can't do anything about that. A full search-and-replace on all files, pages and URLs is out of question here. The problem: when Apache gets called with an URL like the one above, it (correctly) translates the "%20"s into spaces, and then of course it can't find the files, because they don't have actuale spaces in their names. How can I solve this? I discovered than by using an URL like http://servername/file%2520name.html it works nicely, because then Apache translates "%25" into a "%" sign, and thus the correct filename gets built. I tried using an Apache rewrite rule, and I can succesfully replace spaces with hypens with a syntax like this: RewriteRule (.*)\ (.*) $1-$2 The problem: when I try to replace them with a "%2520" sequence, this just doesn't happen. If I use RewriteRule (.*)\ (.*) $1%2520$2 then the resulting URL is http://servername/file520name.html; I've tried "%25" too, but then I only get a "5"; it just looks like the initial "%2" gets somewhat discarded. The questions: How can I build such a regexp to replace spaces with "%2520"? Is this the only way I can deal with this issue (other than a full search-and-replace which, as I said, can't be done), or do you have any better idea?

    Read the article

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