URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
2answers
25 views

mod_rewrite gives 404 error

I'm making a CMS and trying to convert post links to pretty ones like so: Original Link: http://localhost/index.php?id=13&category=Uncategorized&title=just-a-link Converted Link: ...
1
vote
1answer
18 views

Redirect rules for .htaccess with mod_rewrite

I have a PHP script dynamically generating content from a database based on queries. The user might do a search from a text box for the username "mark". The content is provided by PHP at ...
1
vote
3answers
1k views

Empty rewrite.log on Windows, RewriteLogLevel is in httpd.conf

I am using mod_rewrite on Apache 2.2, Windows 7, and it is working ... except I don't see any logging information. I added these lines to the end of my httpd.conf: RewriteLog ...
0
votes
2answers
963 views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
1
vote
0answers
13 views

Use different client IPs with mod_rewrite and mod_remoteip

I have a reverse proxy that my site points to to help with DDoS protection. I have mod_rewrite set to use a specific header provided by the reverse proxy in order to pull the actual client IPs instead ...
-1
votes
1answer
14 views

apache: prepend a string literal to a TestString in a RewriteCond for mod_rewrite [duplicate]

So I can clearly do this: RewriteCond %{REQUEST_FILENAME}\.php -f But I cannot do this: RewriteCond some_directory/%{REQUEST_FILENAME}\.php -f Furthermore, this also fails: RewriteCond ...
-1
votes
1answer
29 views

How to mask one of my domains to another?

I want one of my domains (freelawofattractioncourse.com) to point to another site of mine (http://katievb.com/freecourse) without causing the URL to change in the address bar. In other words, when a ...
2
votes
2answers
576 views

Weird apache mod_rewrite behavior

I'm new to the site and I hope you can help me with an issue that happened to me trying to install Rhodecode. Here's the (long) story: I've managed to install Rhodecode inside a virtualenv in a linux ...
1
vote
1answer
326 views

Exclude directory from rewrite with mod_rewrite and lighttpd

Im migrating an apache2 server to Lighttpd, however im having some issues with Mod_Rewrite. I have a directory /api/, which I need to exclude from the rewriting rules as follows: url.rewrite-once = ...
0
votes
1answer
16 views

mod_rewrite sending redirect loop when trying to redirect based on user agent

I am using Apache 2.2.3 (old version, I know) So I am trying to redirect based on older versions of IE (6 and 7 for now... ) and I am getting a redirect loop. I have: RewriteEngine On RewriteCond ...
0
votes
0answers
12 views

Redirect from different domains on SSL without URL rewriting

Problem I have two domains hosted on hostgator (on different servers): Domain A is using cloudflare for DNS and flex SSL. This is hosting a product page with info about product. Domain B is using ...
1
vote
1answer
26 views

Conditionally serving files from a directory outside of the document root with Apache2

I have inherited a web application written in PHP. The code is not the best and I want to start using the Symfony framework. It will be a gradual migration through several releases so I need the ...
2
votes
1answer
12 views

404 when trying to shorten url for mediawiki (lighttpd)

I'm absolutely new at this, so please bear with me. I installed mediawiki on lighttpd with no problems, except that when I try to follow up redwerks instructions on how to shorten the urls for ...
0
votes
1answer
2k views

Apache, Reverse Proxy, Rewrite, HTTPS

I am creating a Reverse Proxy box with apache and i have some questions about that: How can i load some files, say robots.txt, off the reverse proxy box instead of the actual host? Would it be wise ...
0
votes
3answers
1k views

Lighttpd: Enabling module rewrite for Drupal

I'm configuring lighttpd (1.4.26) for drupal on Ubuntu 10 and I've some issues with the rewrite module. So far I have enabled the rewrite module in lighttpd.conf Then, I have added the following ...
2
votes
1answer
983 views

Apache redirecting https://host:port/folder to http://host:port/folder/

I have a apache server using two SSL domains (no SNI support) in different ports, kinda like this: https://host1.tld:443 (default) https://host2.tld:444 (non-standard) I have a Rewrite rule to ...
0
votes
1answer
14 views

How to write more than one mod-rewrite rule?

I always used the following rule to manage urls: Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^.*$ ./urlredirect.php ...
1
vote
1answer
1k views

Apache ProxyPass/RewriteRule with p flag: Return no content when response has multi-part content type i.e.images

This is a continuation of a previous question which has been implemented with a little change. Following is the structure I am going to talk about. My goal is to create the Tunnel/Proxy. ...
2
votes
1answer
2k views

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

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 ...
0
votes
1answer
20 views

Some mod_rewrite syntax clarification

We inherited some code recently and I'm reviewing the .htaccess file of one of the sites. I understand what the end result of most of the rewrite rule sets are, I'm just unsure of some of the syntax. ...
0
votes
0answers
12 views

Apache 2.4 mod_rewrite on vhost_alias

i have configured apache as dynamic mass virtual hosts. I have serval applications writen in symfony2 with .htaccess Vhost looks like this: <VirtualHost _default_:80> ServerAdmin ...
5
votes
1answer
2k views

Apache sends plain-text response when accessing SSL-enabled site without HTTPS

I've never encountered something such as this before. I was attempting to simply redirect the page to the HTTPS version if it determined that HTTPS was off, but instead it's displaying an HTML page ...
0
votes
0answers
16 views

Combine modrewrite condition to avoid double redirects

There are two modrewrite directives in my htaccess file. One is redirecting uppercase URLs into lowercase. The other one is redirecting http and www requests to https and none www. #Redirects ...
0
votes
4answers
2k views

Faster Option: Redirect via PHP to PHP or Apache mod rewrite redirect to PHP?

I want to determine if using Apache's .htaccess mod rewrite is a faster way to redirect to a PHP file, compared to redirecting from one PHP file to another, using the header redirect core function of ...
2
votes
2answers
114 views

RewriteRule for root without the R flag is not working

I'm trying to do a cache system with files. And I was thinking of using mod rewrite to serve the cached file if it exist, or the php file (that will create the html static cache) if not. Here is the ...
-1
votes
0answers
12 views

301 redirect not working as expected [duplicate]

i've set some redirects in my htaccess file, this is what i got so far: RewriteEngine On Options +FollowSymLinks Redirect 301 /products http://www.newdomain.com/sm/folder/ the old ...
0
votes
0answers
5 views

Apache config with rewrite causes loop [duplicate]

I have to port a WebApp to a new server. On both servers I use the Apache 2.x webserver. I have to redirect every user from m.domain.com/$restOfPath to m.domain.com/mobil/$restOfPath. With ...
1
vote
1answer
42 views

Apache (httpd) VirtualHost RewriteCond Variables not working

I am trying to make a dynamic virtual host entry with the intent of redirecting all traffic to .mydomain.com to /var/www/html/ this part works but I also what a Rewrite conditions that checks if the ...
1
vote
1answer
15 views

How can I force mod_rewrite to send user info component of a URI?

A colleague recommended I repost this from StackOverflow to ServerFault: This has been driving me crazy. I have a web application that's being served via Apache Web Server. The database server that ...
1
vote
0answers
16 views

Apache rewrite not finding path

I am trying to rewrite an internal path for specific requests. I have the following URL: ...
0
votes
0answers
12 views

Set 1 cookie on 2 different subdomains

I am trying to get one cookie to work with 2 domains. Currently using an agreement page once a users first views the website that it will come up and they have to accept the ToS to continue, however ...
1
vote
2answers
20 views

rewrite refuses to work

I want to rewrite this url: http://cyanogenupdatetracker.com/api/v1/show_devices.php to http://cyanogenupdatetracker.com/api/v1/devices I used this .htaccess file Options +FollowSymlinks ...
0
votes
0answers
58 views

Apache Allow Override Not Working with Docker Container

To sum it up; I can't get httpd.conf AllowOverride to work inside a CentOS:6.6 Docker Container. It completely hides the alias directory to any browser. I know it is not permissions and it is not ...
0
votes
1answer
28 views

Stop processing and return to client immediatly in Apache

I have a Apache 2.2 that hosts a proprietary (commercial) authentication module. That modules looks at every requests and might let them through if they are flagged and "anonymous ok" in the back-end ...
0
votes
0answers
116 views

mod_rewrite path info postfix and per-dir prefix

There's an issue with .htaccess configuration. I just need the url /category to match the category.php script, but when I try to open this url, there's a 404 error instead. Here's my .htaccess: ...
0
votes
0answers
30 views

Problems loading CSS. Error.log prints: “Request exceeded the limit of 10 internal redirects”

I have issues on my server. When I do changes to CSS file they are not showed until one day later or more. I have seen the following error in the apache error.log: [Thu Jul 16 08:48:49.193132 2015] ...
0
votes
1answer
43 views

apache mod_rewrite rule not working [duplicate]

I'm testing the rule below else where and it's working but on my system it's not (centos 7, Apache/2.4.6) [I changed my domain to domain.com for the post here] the purpose of the rule is to rewrite ...
0
votes
1answer
30 views

Remove double URL encoding on URL

I have a third-party shopping cart set up on my server using PayPal for payments. When a user completes a transaction they are redirected to the URL ...
0
votes
0answers
28 views

Apache redirection to domain (both Http and https)

I'm trying to redirect some urls in http and https to a new subdomain. For example: http://myurl.com/one/two/three -> http://newsubdomain.myurl.com/one/two/three https://myurl.com/one/two/three ...
0
votes
0answers
13 views

mod_rewrite leads to 404

I'm trying to redirect (internally) example.com/snippets/_filename_ to example.com/snippets/?f=_filename_ using mod_rewrite... And it is not working. The contents of my .htaccess file, which is ...
0
votes
2answers
145 views

Configuring a server-wide RewriteRule in conf-available

Lately I have been getting some referrer spam in my website's logs. In order to stop this (as it's quite annoying and also polluting my statistics), I want to block requests that are coming from ...
11
votes
2answers
9k views

best way to debug nginx config file?

I have a bunch of rewrite rules that I have to port from apache to nginx. It's a rather painful process because I'm not able to see if my rewrite rules and "if" conditions are working as I want them ...
0
votes
2answers
73 views

Wordpress shows permanent loop redirect after upgrading from Apache 2.2 to Apache 2.4

I've upgraded my Apache 2.2 web server to 2.4 today and then some Wordpress installations started to get infinite loops from non-www to www and from www to non-www :( Removing .htaccesss didn't ...
0
votes
1answer
100 views

Nginx url rewrite file not found

I have converted my .htaccess to work with Nginx but i have many 404 errors or wrong display for folder and subfolder rewriting. This Nginx config works for folder and subfolder but for /view/ its ...
0
votes
0answers
49 views

Haproxy and rewrite rules issue?

I have HAproxy listening on port 80 to send requests to a node server (port:3000) or php server (4000). The following rewrite rules should add a trailing slash to any url that is pointing to an ...
0
votes
1answer
20 views

Redirect all vhosts when a certain condition is true

I am trying to redirect all vhosts to a certain url based on the REQUEST_URI. For example if somebody makes a request to www.something.com/condition on my server to be redirected to google.com I ...
0
votes
0answers
41 views

Replace all matching characters in a parameter value with mod_rewrite?

I am attempting to change all the space characters to a + in the token URL parameter value but I'm only getting the first occurrence to change. I have a 3rd party sending me a POST with unescaped + ...
0
votes
0answers
10 views

Denying access to autogenerated file in Apache and Magnolia

I have several virtualHosts in a machine with magnolia working on it. Magnolia auto-generate a sitemap's file so I'm trying to deny its access with Apache 2.4 I've tried this: <FilesMatch ...
0
votes
1answer
22 views

htaccess rewriting same page names conflict

My htaccess file has the following two lines RewriteRule ^payment payment.php RewriteRule ^payment-confirmed payment-confirmed.php When trying to access payment-confirmed.php it just goes to ...
1
vote
1answer
83 views

Apache Redirecting All Sub directory Sub Folders Back to Root Directory [closed]

I have a website stored in a root folder. example.com correctly brings me to the website stored in /var/www/mainsite. I want to put multiple websites in sub folders. so example.com/website1, ..2, ..3 ...