Questions tagged [mod-rewrite]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Apache full url redirect except one page

I need to add following Apache redirect rules `http://www.example.com`` to be redirected to http://www.onemoreexample.com` but http://www.example.com/support/ should not be redirected. I am ...
0
votes
1answer
10 views

Apache RewriteMap with wildcard

We want to migrate multiple domains on new servers. In the first step (though from a SEO point of this is not recommendable) everything has to be redirected to the new domain's root. Later the team ...
-1
votes
1answer
37 views

display a different name from the 'real' URL name

I need to change an incoming http request for www.pathfinder.com/T/client/care/login.html to look like www.Theshop/care/login.html in the "URL" line on the browser. How can this be done with using "...
1
vote
0answers
19 views

Why Apache mod_speling redirects lose cookie? [closed]

rhel6, apache 2.4 with mod_speling enabled Content migrated from IIS env riddled with case issues. mod_speling is working great but I found that on every 301 redirect the cookie is lost and ...
1
vote
1answer
3k views

Redirect Main domain and subdomain from http to https

i want to redirect these sub domains and main domain from http to https and sub blogs too. Home directories WWW (Wordpress): /home1/placehq5/public_html/.htaccess My Somadome (PHP): /home1/...
2
votes
1answer
1k views

.htaccess rewrite not working?

I have the following virtual host in /etc/apache2/vhosts.d/ip-based_vhosts.conf: <VirtualHost test.local:80> ServerAdmin webmaster@test.local ServerName test.local DocumentRoot /home/web/test....
1
vote
1answer
873 views

Apache query string rewrite not working

I need to rewrite a domain name in a query parameter in order to augment a proxy. The proxy basically is just a domain rewrite, but some of the responses from the upstream server include a query ...
1
vote
0answers
666 views

.htaccess for redirecting an URL with hashtag

I have urls which I need to redirect to another URL. The issue is that the source URLs contain # character. source url: http://www.wawa.com/fr/#/creations/eclairs redirect to : http://www.wawa.fr/fr/...
1
vote
0answers
442 views

mod_rewrite / htaccess not working

I can't get mod_rewrite to work on a client's site, it's just ignoring the .htaccess file completely. I'm not 100% sure what flavour of Linux is being used, it seems to be CentOs. I've checked the ...
0
votes
1answer
26 views

How can I get Wordpress functioning from its new address?

I have a Wordpress installation which I wish to redirect from http://dev.example.com to https://example.com I can get an unstyled page like the below; the browser balks at loading HTTP content for an ...
0
votes
1answer
42 views

mod_rewrite all and if not found

I need to make some rewrite rules, but I doesn't use Apache HTTP for years and little bit confused with rules... Task: rewrite URLs from http://example.com/test/file.js to http://example.com/test/1/...
0
votes
1answer
172 views

Apache: rewrite rule with variable data

I need make this redirect to my webserver: www.hostname.com/path1/path2/123456789 to www.hostname.com/search?q=123456789 I have inserted this rule to htaccess file: RewriteRule ^/path1/path2/([0-9]+...
1
vote
1answer
184 views

Htaccess - Map dynamic URL query to a static file

I'm trying to map this dynamic query: /wp-admin/admin-ajax.php?action=mymail_form_css to this static file: /wp-admin/mymail_form.css What I've tried so far which doesn't seem to work is this ...
0
votes
2answers
1k views

VirtualHost with mod rewrite pointing at tomcat application

I am setting up a server running on Ubuntu 14.04. I have apache and tomcat installed with the rewrite module for apache and mod_jk enabled. I have mod_jk properly configured so apache is forwarding ...
1
vote
1answer
69 views

Can you have two directory rewrite rules in one configuration?

In /etc/httpd/conf.d for custom conf file where you have multiple sites and databases but with different systems installed in non root folders can you declare more than one rewrite rule like below? I ...
1
vote
0answers
295 views

Need .htaccess Rewrite Rule To Remove Trailing <br%20/>

I have links that for some reason have a trailing <br%20/> and I don't know where they are coming from to try and fix them. So I need a general rewrite rule to remove them so the links won't ...
0
votes
1answer
1k views

Apache redirect full URL with RewriteRule

I have a redirect problem with 'RewriteRule', i have this in mt .htaccess: RewriteCond %{HTTP_HOST} ^foo.domain.com RewriteRule ^(.*)$ http://www.domain.com/foo/$1 [R=permanent,L] If i go to foo....
0
votes
1answer
155 views

Incorrect Directory Index

I am attempting to load as the default DirectoryIndex home.html, but the site keeps jumping to index.php. Website is built on WordPress. httpd.conf DirectoryIndex index.html home.html index.php ...
1
vote
1answer
126 views

How can I rewrite with apache mod_rewrite an entire directory?

I need this URL/directory make/lores/some/ to point/map to login/ I also need to rewrite .php extensions to .html Example When the client types in example.com/make/lores/some/login.html the server ...
1
vote
3answers
855 views

mod_rewrite returns a 301 OK, not Moved Permanently?

I recently set up monitoring for my mod_rewrite server with help in the question Pattern matching across multiple lines. Every once in a while - I'm not sure what triggers it - I get a HTTP/1.1 301 ...
2
votes
0answers
3k views

How to configure mod_rewrite with an Alias in Apache 2.4?

How do I use apache mod_rewrite with an Alias ? I have a test directory that contains the files: correct.html index.html test_httpd.conf wrong.html I would like an example rule using an alias that ...
0
votes
1answer
425 views

Unable to access http service intranet

I'm not sure if this is the right place, if this is the case I will move the question with no problem. I'm setting up a web server for testing Wordpress. Everything works fine if I try to access the ...
0
votes
1answer
642 views

How to redirect user to Android Market in Apache?

On my website I should redirect Android users to my application on Android Market. What is the optimal way to do this? My first idea was RewriteCond %{HTTP_USER_AGENT} Android [NC] ...
1
vote
1answer
2k views

How to rewrite all subdomains except one

Right now my rewrite rule forwards all subdomains except chat.auricle.fm to the root: RewriteEngine on RewriteCond %{HTTP_HOST} ^.*\.auricle\.fm [NC] RewriteRule ^(.*)$ http://auricle.fm/$1 [L,R=301] ...