Skip to main content

All Questions

Tagged with
1 vote
1 answer
269 views

Apache GeoIP redirect to page with question mark

I have a stumbling block with GeoIP redirect (Apache/2.4.6 (CentOS)) .htaccess has the mandatory directives (necessary for functionality, change can break the whole site) RewriteEngine On RewriteCond %...
Serge's user avatar
  • 689
1 vote
1 answer
585 views

I am trying the rewrite the URL, but getting internal server error 500

This is the URL: https://example.com/demo-2/project-details?pid=9&slug=Ace-Starlit` and I am trying to convert the above URL into this: https://example.com/demo-2/project/9/ace-starlit demo-2 is ...
Manu Srivastava's user avatar
2 votes
1 answer
53 views

How to change .htaccess deny action to "abort"

I have implemented various deny rules in my Apache .htaccess file. The default deny action is a 403 (forbidden) response from my web server. Is there a way to change Apache's deny action to "...
Tony's user avatar
  • 383
1 vote
1 answer
46 views

I can't apply two rules at the same time in htaccess

and thanks to read me. My goal is to have the same htaccess code in local and production. First, I need to rewrite example.com/index.php?action=somepage to example.com/somepage. Second, I must rewrite ...
Cyril's user avatar
  • 187
0 votes
1 answer
102 views

Two different Query string redirect to same structure Htaccess

Please help me, I have two cases, I have a URL to redirect, for example https://example.com/about-us and my rewrite rule is RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ...
user3090994's user avatar
1 vote
2 answers
1k views

if index.html does not exist in subdirectory go to

I have a site in the Apache, that the folder is: /var/www/html/content at this level I have an index.html /var/www/html/content/index.html and I have a lot of subfolders, but not all of them has a ...
geraldgangsta's user avatar
1 vote
1 answer
65 views

Rewrite rule question / image rewrite htaccess

I'm having this rule which works just fine: RewriteRule ^([^/-]*)-([^/-]*)-([^/-]*)-([^/-]*)-([^/-]*)-([^/-]*)-([^/-]*)-([^/])*\.jpg$ $1.jpg [QSA] It means 1-x-x-x-x...jpg will always be in first ...
gplaces's user avatar
  • 13
1 vote
1 answer
118 views

How to implement 301 permanent redirection using htaccess with custom parameter in URL?

Here I have a URL like www.abc.com/product/women/casual/page:5/ and I need to implement 301 permanent redirection using htaccess in order to change the URL to www.abc.com/product/women/casual/page/5/. ...
Tech Team's user avatar
1 vote
1 answer
170 views

Apache .htaccess REQUEST_FILENAME not limited to 257 chars

I run my API trough Apache (2.4.46) using .htaccess-rewriting to provide clean URLs. Apache has limit of 257 char for filename in URL. .htacces looks like this: RewriteCond %{REQUEST_FILENAME} !-f ...
Jens's user avatar
  • 13
1 vote
1 answer
640 views

What does RewriteRule ^(.+)/$ $1 mean in RewriteRule directive in htaccess

I have found similar but not exactly. If someone can explain why this plus sign (+) is used in the following. I found information about^(.*), but not ^(.+). I need some more clarification for why is ...
HK Technical's user avatar
1 vote
1 answer
230 views

htaccess redirect rules md5 and keep md5

I have : https://old.example.com/{md5} I would like transferred to a new domain only if it is an md5 and keep this md5 as a get variable = https://new.example.com/login?md5={md5} I have the following ...
pablofr's user avatar
  • 134
0 votes
1 answer
665 views

htaccess Rewriterule for multiple Parameters

I have an URL that Looks like: https://www.example.com/project/api/read.php?uid=1234567&dvc=ABCDE I would like to establish a rewrite rule that turns the URL in: https://www.example.com/project/...
Daniel's user avatar
  • 1,219
0 votes
1 answer
24 views

Rewrite Rules different filename same redirection

I would like to have something like that in .htaccess: ^Test/filename/param --> mydirectory/test.php?id=$1 The filename can be different each time but the redirection will always be the same. Only ...
Akis Giannopoulos's user avatar
0 votes
1 answer
28 views

Redirect RewriteRule htaccess

RewriteEngine On RewriteRule ^([a-zA-Z0-9]+)$ product-detail.php?asin=$1 [NC,L] i have the above rerwrite rules http://localhost/fashe-colorlib/B07CNMLF8P http://localhost/fashe-colorlib/product-...
webscrapingtech's user avatar
0 votes
1 answer
221 views

OpenLiteSpeed: Get last part of an URL as GET parameter with rewrite rules

I want to get the last part of a non-existing URL and then pass it as a GET parameter. Example: http://example.com/store/20 should load http://example.com/store?id=20 I used the following answer ...
Milo's user avatar
  • 5

15 30 50 per page
1
2 3 4 5 6