Questions tagged [rewrite]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
122 views

Nginx rewrite rules not working

We are moving our site from Apache to Nginx. So far, the rules that we have converted from .htaccess rules to nginx are working fine but this particular rule is giving me a hard time. I've tried ...
0
votes
0answers
25 views

Nginx Location Redirect to file

I am trying to redirect all $uri to a static directory /the/dir, and if the file does not exist submit a static /index.html in this directory. Lets say the URI is /path/before/app where my Vue ...
1
vote
1answer
463 views

Rewrite url and serve file with such filename nginx

I have a strange task and I have no idea can I do it or not. Nginx gets request by url Nginx must remove from url characters by regex And Nginx must serve file with that name For example: Request /...
0
votes
0answers
12 views

Rewrite domain to specific URI

Each domain has own .conf file in NGINX. Now, I have one root project in /var/www/html/myproject/public and I want to rewrite the given domains that fall under specific URI, so having server_name ...
1
vote
0answers
104 views

Postfix configuration - canonical address mapping

I am trying to configure the mapping in postfix to take all outgoing mail and redirect it to certain inboxes. I have a working setup which will rewrite/redirect properly in the canonical_recipient ...
0
votes
1answer
66 views

What write patterns are “flash-friendly”?

Assume we are talking about a run-of-the-mill USB flash drive (which may or may not do wear leveling) and a "dumb" filesystem that isn't especially optimized for flash memory (like FAT32, etc.) The ...
1
vote
1answer
49 views

How I can add Rewrite rule in htaccess only for home page?

I have a problem with apache. My site has these rules now: RewriteCond %{HTTP_ACCEPT} text/html [NC] RewriteCond %{HTTP_HOST} ^mysqite\.com [NC] RewriteRule .* path/to/html/my.html [L] I need ...
2
votes
1answer
383 views

dokuwiki, nginx and farms

I am attempting to setup multiple dokuwiki's but I am really struggling... I can set up one with relative ease but I would like to make use of the farm concept ( https://www.dokuwiki.org/farms ). The ...
0
votes
0answers
1k views

IIS 7.5 URL Rewrite to HTTPS not completly working

Lately I've installed a SSL certificate for a website on a IIS 7.5 webserver. Then i set up a URL rewrite rule to rewrite HTTP to HTTPS. So far almost everything is working except for one thing. If i ...
0
votes
1answer
557 views

Web browser does not hide root slash in URL between host & path

Thanks in advance for any help provided. Update: Tanks to Gerard H. Pille, Adrien replies and some logs investigations I've come to transforming question a bit. Now I firmly realize that final slash ...
0
votes
2answers
2k views

How to map a external subfolder to different server (LAN) subfolder in Apache (CentOS Web Panel)

System: CentOS 6.8 with Centos Web Panel Server: Apache Server IP: 10.0.0.150 I have public URL of sub.domain.com/folder and I need to Proxy/Rewrite/Map to 10.0.0.253/folder. I want sub.domain.com/...
0
votes
1answer
2k views

NGINX: rewrite specific (variable) path only

I want to rewrite a url containing a specific variable path, for one specific user ip only. http://domain.com/variable Should become: http://domain.com/variable/system However, if there is another ...
0
votes
1answer
1k views

Nginx rewrite rule to replace 'random' folder from an URL

Let's say a user tries to access a given image on my website using the following URL: http://www.mywebsite.com/random/image1.jpg?someParam=100 I need a rewrite rule to this, removing the 'random' ...
1
vote
1answer
888 views

Nginx catch all domain, then add www if not present

This setup is for multiple domain sharing a single CMS platform. It will allow any domain to point to my server ip. I can use nginx server_name _; to catch all. But then I would like to 301 redirect ...
1
vote
0answers
119 views

Ubuntu 14.04 Nginx Rewrite rule issue

Problem with nginx mod rewrite. Really appreciate help. I spent hours on that issue Problem with rewriting url. I want rewrite from bangots.eu/?subtopic=highscores bangots.eu/?subtopic=houses to ...
0
votes
1answer
113 views

RewriteRule not redirecting to specified URL

Here is my rewrite rule: RewriteRule ^rest/v(?:[0-9.]+)/((?:[A-Za-z]+)/(?:[A-Za-z]+)(?:/(?:[A-Za-z0-9])+))?\.(json)$ https://localhost/rest/v1/index.php?url=$1&type=$2 [QSA,NC,L] It’s something ...
0
votes
1answer
2k views

htaccess file works for Chrome & IE, but half-way in Firefox

I tried to use .htaccess file to redirect http:// to https:// I also tried to append www. in front of domain-name, if it is not written. I used this code in the .htaccess file Options +FollowSymLinks ...
9
votes
2answers
9k views

The Module DLL C:\WINDOWS\system32\inetsrv\rewrite.dll failed to load

I just upgraded to Windows 10 from 7. Cool so far, but when I try to go to any of my applications the app pool crashes and I get a 503. I can restart the app pool but it continues to crash. So I ...
0
votes
1answer
396 views

Why would Chrome rewrite links within pages from the http:// to https:// scheme?

I'm completely stumped with this issue: When visiting a website which is a virtual host, without SSL support and with no reference to any https:// scheme within its database, or any file within it's ...
0
votes
1answer
359 views

How do you use .htaccess to redirect multiple subdirectories to root directory?

I have a website. The website's url is web.pixelblock.us.to. Unfortunately, the forum software writes the urls as http://web.pixelblock.us.to/home/pbnx10ho/public_html/$1. I want .htaccess to redirect ...
0
votes
1answer
36 views

Using Apache RewriteRule

I'm attempting to get a very simple RewriteRule working in Apache - I've set Apache2 up (in Vagrant) and run sudo a2enmod rewrite successfully (and restarted Apache after), with the following trivial ...
0
votes
1answer
2k views

Nginx redirect all requests trying to reach a folder

How can I redirect all requests trying to reach a folder? for example, I would like to redirect: somedomain.com/folder/subfolder/index.html somedomain.com/folder/subfolder2/something.html somedomain....
0
votes
1answer
3k views

nginx rewrite move from risky if statements to try_files. Can anybody help convert? (short)

I am trying to clean up my nginx rewrite rules for my vBulletin forum which has some modifications and additional software within the same site which causes problems. I have things working as they ...
2
votes
0answers
662 views

Url rewriting faliure in case of UTF8 urls in nginx

I am using Nginx webserver and I want to rewrite some old urls on my site to new ones inorder to prevent 404 errors. For English urls everything is OK and adding a rewrite rule like the following to ...
0
votes
0answers
57 views

CentOS 6 64Bit For DNS for my domain

Entries in DNS (named) are like www A 1.1.1.1 mail A 2.2.2.2 Well I am using wordpress in www.mydomainname.com now I have www.mydomain.com/?pageid=16 used for blogs so I want to add a entry in DNS ...
1
vote
2answers
52 views

Apache rewrite downside?

Say I have my website stored on domain.com/mysite I add a rule in .htaccess to rewrite the URL to domain.com Is there any downside to storing the site in a subfolder and rewriting the URL like this? ...
9
votes
6answers
17k views

How to remove double slash in URLs served by nginx?

I need to replicate the following Apache rewrite rules in Nginx config on Ubuntu 12.04. What is the nginx equivalent to : RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L]
0
votes
1answer
2k views

Rewrite a specific path in xginx

I am trying to rewrite a specific path using nginx. I have setup my server using nginx/php-fpm/php and it is working fine. I have the following server configuration: server { listen 80; ...
0
votes
1answer
1k views

How to have url rewrite to a specific port on Mac OS X server behind DD-WRT router?

I've just setup a home web server using Mac OS X Lion's built-in Apache server. I setup access my Subsonic music server running on port 4040 and my torrent remote control on port 9091, as well as the ...
0
votes
1answer
2k views

Can't erase my suposedly re-writable DVD

I need to make a Windows 7 recovery disk. The problem is that I've only got one DVD lying around the house free to use. It's got a Ubuntu 10 Wubi installation in it which my uncle gave to me ages ago....
1
vote
2answers
3k views

Nginx-Remove WWW from HTTPS

I would like to ask for some help with the following Nginx configuration, so that URLs such as https://www.mywebsite.com get rewritten as https://mywebsite.com. I am currently using the following ...
13
votes
1answer
30k views

Nginx: Serve static files out of a given directory - one level too deep

I'm pretty new to nginx configs. I'm having some difficulty with a pretty basic problem. I'd like to host some static files at /doc (index.html, some images, etc). The files are located in a directory ...
9
votes
1answer
6k views

How is Apache mapping files without extensions?

My local dev setup is mapping things like http://mydomain.dev/testhtmlpage to testhtmlpage.html and http://mydomain.dev/testphppage to testphppage.php. The browser stays on the orginally enter URL. ...
-1
votes
1answer
375 views

mod_rewrite URL capitalization [closed]

I'm considering using apache's mod_rewrite module to capitalize a single character in my domain name as presented to a user. For example: www.testatest.com would become www.testAtest.com Is this ...
0
votes
3answers
651 views

Possible to stop Adobe DreamWeaver from rewriting 'onclick' to 'onClick'?

I've been giving my dev team grief by checking in HTML edited in DW. It turns out that DW has silently been rewriting all instances of 'onclick' to 'onClick' completely breaking the application in ...
0
votes
2answers
1k views

apache RewriteCond variable for parts of REQUEST_URI

I migrate a static html site to drupal CMS, most content I just copied the html for now and want to leave it as is and make the relative links to pdf files working. Drupal has all files in this dir: ( ...
0
votes
1answer
1k views

Fiddler Web Debugging Proxy's “AutoResponder” feature on Linux

There is a website that I like visiting which uses a Javascript that does not work on Linux with Iceweasel. Looking into the source, I have found a simple way to fix it, so what I would like to do is ...
3
votes
4answers
2k views

What Firefox functionality do I use to rewrite and open the URL of the active page?

Our university provides a proxy service that allows me to browse websites as if I was online via the university network. However, lazy as I am, I get tired of going to the URL edit field in Firefox ...
5
votes
4answers
4k views

Redirect browser to different host and port

Background, Running windows 7, FF3.5, and am an admin. I recieve emails from an internal company service that has links. The problem is the links don't work from my office. If the resource is http://...
0
votes
1answer
5k views

How do I forward requests to another URL without actually changing the URL in Apache?

I have Apache running in a domain, for example http://example.com. I also have Tomcat running on my server and I've forwarded all requests made to http://example.com/t/ to Tomcat and all other URLs ...
2
votes
3answers
213 views

Can't figure out why this regex doesn't apply

I am using Privoxy 3.0.10.0 to filter web pages before they're passed on to the browser. I can't figure out why this simple regex doesn't trigger a rewrite. Maybe someone more experienced will have ...