Questions tagged [rewrite]

The tag has no usage guidance.

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

nginx rewrite overlapped with Swagger body

Here's my nginx.conf: server { charset utf-8; client_max_body_size 512M; listen 80; listen 443 ssl http2 default_server; server_name app; set $base_root /app; root $...
Toqa Abbas's user avatar
0 votes
0 answers
197 views

Convert htaccess rewrite rules script to nginx config

please hlep with this script... i want convert htaccess rewrite rules script to nginx config. .htaccess: AddDefaultCharset utf-8 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond $1 !^(index\...
truefriend-cz's user avatar
0 votes
0 answers
442 views

Remove parameters from URL

I need remove a parameter from urls with htaccess from 1) http://example.com/?id=126:&catid=89 2) http://example.com/page?id=126:&catid=89 to 1) http://example.com/ 2) http://example.com/page ...
Paul James's user avatar
0 votes
2 answers
500 views

What is ROM (Read Only Memory)?

If ROM is non-volatile memory, that means it can not be erased, rewritten, or modified. Then why can data, e.g. a song or photo, in a phone having 64GB ROM, be deleted or replaced with new data?
Nitin Kumar's user avatar
1 vote
1 answer
62 views

Some problems with nginx rewrites - forwarding request from folder to subdomain , then processing it further

I am trying to do the following, and maybe I'm just stuck on a stupid syntax error. old site had a sub-site called database, so we had: www.example.com (getting entirely replaced ) www.example.com/...
Kenshin's user avatar
  • 13
0 votes
1 answer
2k 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 ...
Axel's user avatar
  • 147
1 vote
1 answer
2k 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 /...
Georgy's user avatar
  • 113
0 votes
0 answers
17 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 ...
undefinedman's user avatar
1 vote
1 answer
215 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 ...
Kitten's user avatar
  • 113
1 vote
1 answer
396 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 ...
Win32Sector's user avatar
2 votes
1 answer
568 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 ...
Naib's user avatar
  • 264
0 votes
0 answers
2k 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 ...
Gforse's user avatar
  • 141
0 votes
1 answer
1k 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 ...
Denis.Z's user avatar
  • 11
0 votes
2 answers
3k 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/...
Matt Markevičius's user avatar
0 votes
1 answer
3k 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 ...
The Mane's user avatar
0 votes
1 answer
2k 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' ...
Malliktajmahal's user avatar
1 vote
1 answer
1k 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 ...
Syed's user avatar
  • 11
1 vote
0 answers
126 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 ...
Szmycu's user avatar
  • 11
0 votes
1 answer
125 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 ...
Adam Carter's user avatar
1 vote
1 answer
3k 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 ...
Victor Ivanov's user avatar
10 votes
2 answers
18k 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 ...
DeadlyChambers's user avatar
1 vote
1 answer
481 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 ...
zoot's user avatar
  • 131
0 votes
1 answer
438 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 ...
Minedude78910's user avatar
0 votes
1 answer
46 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 ...
eZanmoto's user avatar
  • 131
0 votes
1 answer
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....
Orlo's user avatar
  • 263
0 votes
1 answer
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 ...
user3125310's user avatar
2 votes
0 answers
730 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 ...
omidrezav's user avatar
0 votes
0 answers
62 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 ...
Ashish's user avatar
  • 101
1 vote
2 answers
57 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? ...
Patrick's user avatar
  • 11
13 votes
6 answers
35k 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]
codecowboy's user avatar
0 votes
1 answer
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; ...
PeeHaa's user avatar
  • 242
0 votes
1 answer
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 ...
Zach Morgan's user avatar
0 votes
1 answer
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....
honno's user avatar
  • 11
1 vote
2 answers
4k 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 ...
NetStudent's user avatar
14 votes
1 answer
33k 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 ...
Joe J's user avatar
  • 518
9 votes
1 answer
7k 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. ...
Denis Hoctor's user avatar
-1 votes
1 answer
387 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 ...
Casey Flynn's user avatar
0 votes
3 answers
685 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 ...
DA.'s user avatar
  • 605
0 votes
2 answers
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: ( ...
groovehunter's user avatar
0 votes
1 answer
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 ...
Daniel Trebbien's user avatar
3 votes
4 answers
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 ...
Egon Willighagen's user avatar
5 votes
4 answers
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://...
user avatar
0 votes
1 answer
6k 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 ...
Kim L's user avatar
  • 145
3 votes
3 answers
223 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 ...
user avatar