Questions tagged [mod-rewrite]

mod_rewrite is an Apache module that allows for server-side manipulation of requested URLs.

For an introduction and examples of using mod_rewrite, read over the comprehensive article,
"Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask"

2224 questions
0
votes
1 answer

Apache: Open same .php file with any URN (abc.com/) but keep the URL

I basically found a part of my solution here: Apache rewrite rule and keep the url unchanged? but I want to do more. I want to open a "template.php" site which comes up on any URN entered. So if I open abc.com/blabla, template opens and URL stays…
0
votes
1 answer

Apache Rewrite redirect all pages except for specific

I am retiring a site and would like to display a message when anyone tries to access any page on the site EXCEPT for a couple of pages. Some pages have certain pageid parameters. So basically everything should redirect to /retired except…
Hansilog
  • 11
  • 1
  • 1
  • 3
0
votes
3 answers

Apache2 mod_rewrite won't work

conf file: DocumentRoot /var/www/test/public_html AllowOverride ALL ports: Listen…
Tengiz
  • 109
  • 2
0
votes
1 answer

htaccess - Can this be done? (Nested IfModules)

I'm trying to redirect to a URL if a test for a module passes. Something like this (Which doesn't seem to work for me.) Perhaps this just isn't possible. Anyone? RewriteEngine On …
Jay
  • 157
  • 1
  • 7
0
votes
1 answer

Domain redirect

I'm trying to add a rewrite rule for an old domain test.fr. I have placed my rule in our virtualhost in the httpd.conf file with rewrite engine on, I'm not sure why .htaccess wasn't used. rewrite rules for test.fr RewriteCond %{http_host} ^test.fr…
POPEYE1716
  • 39
  • 1
  • 5
0
votes
1 answer

What is the format for combining several Parameters in RewriteCond?

I want to use the current [OR] but also add: [L,R=301,NC] for a permanent redirect. So is that [OR, L,R=301,NC]?
Clay Nichols
  • 1,431
  • 6
  • 25
  • 30
0
votes
2 answers

Apache RewriteRule error adding Locales to new URL

I am in the process of redirecting a URL and I wanted to use the 'RewriteRule' directive when in the process of doing so. I currently have a rule as follows: RewriteRule ^/application/web/reservation/index.jsp…
0
votes
0 answers

Mapping URL of domain to different folder

So I have following folder structure: - web - SiteA - SiteB - SiteC I have the Domain www.sitea.de pointing to the folder SiteA. So far so good, everything works. Now I would like to point www.sitea.de/siteb/* to the folder SiteB. The same…
SaifDeen
  • 193
  • 1
  • 1
  • 5
0
votes
1 answer

apache mod_rewrite is not resolving OK

I have an Apache server (80 port) running ok as a Reverse proxy of local webserver (82 port) and mod_rewrite without any .htaccess files. I can navigate OK to http://localhost/CONTACT.PRO, it shows me website located on local web server at…
Raul Taboraz
  • 11
  • 1
  • 5
0
votes
0 answers

Apache Proxy mod_rewrite

Following this example, I am running a node application that I copied from here: I have set up Apache 2. for VirtualHost, and as show below, I am proxying an internet address to the local node application running locally.
Ivan
  • 299
  • 1
  • 4
  • 13
0
votes
0 answers

Keep redirect URL after redirecting in destination server reverse proxy

I use Apache as reverse proxy for email web access. Proxy works fine when I connect to login page. I see url email-test.example.com. Unfortunately after login in email server is redirect back to email.example.com(I cant change in email server). So…
Ian
  • 1
  • 1
0
votes
1 answer

Rewrite rules work improper when rewrite rule for HTTP to HTTPS is in same .htaccess file and SSL termination is performed on load balancer

I have two Apache servers behind a load balancer. Both servers are identical and they are used as hosts for several customer's websites. They asked me to enable https access for all websites, together with unconditional redirect of http requests to…
0
votes
1 answer

How can I set mysql connection charset to utf8 in apache mod_dbd?

How can I set connection charset to utf8 in apache mod_dbd with mysql driver? I could not find any corresponding parameter in DBDParams, something like this: DBDParams…
Ehsan Khodarahmi
  • 305
  • 1
  • 7
  • 18
0
votes
0 answers

mod_rewrite -> rewrite rule replacing application context part in original url

I have requirement where user will type url like http://example.com/Welcome in browser, but I need to send it to http://myip.com/someapp/next.html, so I wrote virtual host in httpd.conf file: ProxyRequests off …
kosa
  • 115
  • 2
  • 8
0
votes
1 answer

Trying to determine between rewrite, redirect or proxy for an Apache Application server

I am running an Apache web application server internally, at App.domain.com. It is exposed externally by using port forwarding at the firewall/gateway as app.domain.com:10080. Access generally works both inside (http://app.domain.com) and outside…