All Questions
25,676
questions
0
votes
0
answers
8
views
Yet another .htaccess RewriteRule Condition not being met
This is the baseurl "http://tkrn.io/u/tkrn/1337test.exe" and I'm looking to rewrite it to "http://files.tkrn.io/tkrn/1337test.exe"
RewriteEngine On
RewriteRule ^u\/(.*)$ http://...
-2
votes
1
answer
45
views
Problem with .htaccess redirection to my API
I have a WordPress site in which I develop a plugin. Inside this plugin, I developed a API.
In my local environment, my URL to access my site is http://localhost:81/site. I'd like requests made to ...
0
votes
1
answer
44
views
How to redirect in htaccess without blocking php api?
I have an index.php file which is located in the root directory. This outputs either HTML or JSON, depending on the URL:
<?php
require_once('./../private/Router.php');
new Router();
?>
&...
1
vote
0
answers
28
views
How To Allow Popup Ads Only On Certain Website Pages Using .htaccess File
As a webmaster I would like to exclude popup ads on certain specific webpages on my website whos url ends with a particular string. Example :
https://mywebsite/some-slug-variable/?gallery=submit
I am ...
1
vote
1
answer
48
views
Apache 308 redirects change the protocal from https to http
So I recently updated my .htaccess to replicate the directory slash directive with a 308 instead of the 301 Apache normally uses, so that the browser repeats the same request instead of changing it to ...
0
votes
1
answer
43
views
Laravel project inside a legacy one
I'm trying to make a laravel project work inside a legacy site while we work on modernizing the entire code base. I've been able to make it work in my dev computer using valet creating a custom valet ...
0
votes
0
answers
16
views
How do I use .htaccess to redirect a page only when it has a particular query string?
I want to setup a redirect for a page on my e-commerce site, which relies on query strings to display pages. I want to point a particular brand page to a new URL. Currently, the URL is:
https://...
0
votes
0
answers
34
views
Apache RewriteCond multiple ip not working
I have a problem with my .htaccess file which looks like this :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ...
2
votes
1
answer
23
views
Redirect default language parameter to root with htaccess
I have been looking for a solution, but only found one similar case without an answer (unfortunately). Although the implementation is working, I am still missing one crucial aspect.
I am running a ...
1
vote
1
answer
39
views
How to redirect an url with a specific folder to another, whatever the page?
I tried for hours to redirect in an htaccess every pages of a folder to new url, matching the folder but it seems I definitely do not understand nothing to regex and redirect !
I want to redirect any ...
0
votes
1
answer
40
views
Redirect All URI Requests, Including Folders, to index.php Using .htaccess?
I am trying to configure my .htaccess file to redirect all URI requests, including folders, to index.php. Here is the structure of my root directory:
app
admin
public
index.php
.htaccess
My goal is ...
0
votes
0
answers
56
views
Best way to deny .php in URLs while keeping access to those files through other URLs
Here are two examples of what I would like to do:
Example 1: I have a services.php file. I would like it to be accessible on www.example.com/services. Furthermore, I would like www.example.com/...
0
votes
0
answers
34
views
Load main domain from a directory for a Laravel project
I have a domain example.com, as well as some sub-domains sub1.example.com, sub2.example.com, ..etc. I want to load the main domain from a directory to organize the directories to avoid having Laravel ...
0
votes
0
answers
24
views
Issue blacklisting folders in site's root directory using .htaccess
Context
I have several websites on my server, all of which are addon domains, and each website corresponds to an individual folder inside of the public_html folder. Let's say I have two websites:
...
-1
votes
0
answers
25
views
Can't access folder from public, there're some problems with .htaccess
I am currently developing an API using PHP. I am unable to access images in the image folder. I have attempted to modify the .htaccess file to allow access to file extensions such as jpg and gif, but ...