skip to Main Content

Nginx Replace characters in hostname

I have urls like this: https://foo.somedomain.com https://foo.bar.somedomain.com https://foo.bar.baz.somedomain.com and so on And I want nginx to replace dots "." characters in the subdomain part of the hostname by dashes "-", so this would result in : https://foo.somedomain.com https://foo-bar.somedomain.com https://foo-bar-baz.somedomain.com and…

VIEW QUESTION

how to get PHP Smart URL – Apache

My website has URL like this domain.com/profile.php?id=your_profile_id now how do i turn it into URL like this domain.com/profile/your_profile_id I tried this thing in .htaccess RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule !.*.php$ %{REQUEST_FILENAME}.php [QSA,L] and it's just helps me to remove .php extension.…

VIEW QUESTION

nginx reverse-proxy rewriting custom header (NOT URL)

I am trying to rewrite custom header information like "Author" (not part of the URL) using nginx reverse proxy. The header information "Author:" should be rewritten from "test123" to e.g. "BASIC" command: admin1@nginx1:~$ curl -x 192.168.175.134:80 http://home1.MyWeb.eu:8081/home1/index.html?t=1 -H "Author: test123"…

VIEW QUESTION

Intermittent RewriteRule – Apache

This is my rewrite rule in .htaccess: RewriteRule ^quiz/([A-Za-z0-9-]+)/([0-9-]+)/?$ quiz/index.php?inv=$1&d=$2 [NC,L] It works perfectly fine for these URLs, which have a mix of cases, with and without hyphens, and all with a date for the final segment: http://localhost/quiz/C-PFM/2021-04-30/ http://localhost/quiz/cpf-o/2021-04-30/ http://localhost/quiz/ipa/2021-04-30/…

VIEW QUESTION

Rewrite url for seo friendly htaccess

I want to rewrite this in SEO friendly url. From - www.example.com/section.php?name=website To - www.example.com/section/website I tried this: RewriteEngine On RewriteRule ([^/.]+)/([^/.]+)?$ section.php?type=$1&service=$2 [NC,L] I am fetching data using GET method in section.php and pass to the another page but…

VIEW QUESTION
Back To Top
Search