Skip to main content

Questions tagged [htaccess]

The hypertext access web server configuration file used for overriding configuration on a per-directory basis.

0 votes
0 answers
11 views

htaccess Force All Users to https

I have a valid SSL certificate for my website and want to redirect all traffic to https. I have already modified htaccess previously to enable more legible URLs (things like www.site.com/words/that/...
theguitarman's user avatar
1 vote
1 answer
687 views

Changing content type of .js.php files using .htaccess doesn't work

I want to change the Content-Type HTTP header of some file endings to application/javascript so I don't get an error or warning in the browser. I got .mjs and .js.php. files. The latter are PHP ...
zomega's user avatar
  • 1,250
1 vote
1 answer
549 views

Htaccess remove trash from end of URL using redirect 301

I need to remove "trash" from the end of the URL. I have more than 1000 URLs with this word: "card link" at the end of the URL. The URL before the word "card link" is ...
Adamo Santos's user avatar
1 vote
1 answer
401 views

htaccess RewriteRule regular expression for url with any nesting

There is a site example.com/aaaa/bbbb/cccc/.../zzzz, where /aaaa/bbbb/cccc/.../zzzz is a path with any nesting. If the URL contains a file or directory starting with a dot (hidden file or directory) ...
Вова Дорошенко's user avatar
0 votes
1 answer
365 views

How to mask a URL on a different port with htaccess rewrite

I have a page with a URL like this: https://example.com:3000/newsite but I want to be able to access it from here: https://example.com/newsite and mask the URL as well so it will always show ...
Cain Nuke's user avatar
  • 179
0 votes
0 answers
207 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
1 answer
2k views

How to enable apache directory listing on DSM6?

I want an index to be automatically generated, very similar to the example below. For my website on the internet my web host configured Apache properly, now I need to do this for our intranet on a ...
jay.sf's user avatar
  • 841
1 vote
0 answers
30 views

How to redirect to a different php document in htaccess file

Currently I have the following htaccess file Options -Indexes DirectoryIndex .base.php RewriteEngine On RewriteRule . .base.php how can I modify this in order to redirect to another php file (image....
gg4323412's user avatar
0 votes
0 answers
110 views

Renaming a download file via htaccess

I currently have in a server files in this format https://example.com/files/{group_no}/{date}/{file_no}-file.txt Being: group_no an integer (NN) date format YYYY-MM-DD file_no an integer (NN) ...
SirLouen's user avatar
0 votes
0 answers
498 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
1 answer
63 views

Setting default webpage for shared hosting [closed]

I've got a bunch of domains on a shared ip address (through bluehost, not sure if that matters). Visiting any domain works fine, but visiting the ip address just triggers a 404 error. After doing some ...
Isaac Lloyd's user avatar
0 votes
1 answer
72 views

Apache2 Logs - Single user agent shows as an escaped string

first time caller long time listener. I've been playing around with hosting my own web server via Apache on an Ubuntu VM. I've been reviewing the access.log file, and noticed a discrepancy I can't ...
DualPolarity's user avatar
1 vote
1 answer
417 views

.htaccess RewriteRule works but Redirect 301 does not

I have launched a new version of a website on a new domain. On the old domain I have redirected traffic to the new domain with a global RewriteRule. RewriteRule (.*)$ https://www.newsite.com/$1 [R=...
Keith Slater's user avatar
0 votes
1 answer
2k views

Redirect to a specified port when using https

I have an internal domain: cloud.flint.lo I would like to achieve the following: If URL=http://cloud.filnt.lo Redirect to: https://cloud.flint.lo:5001/sub If URL=https://cloud.flint.lo ...
NeilWang's user avatar
  • 125
1 vote
0 answers
23 views

I'm running Apache 2.4.7, but my .htaccess files are only working with pre-2.4 directives & syntax

I've been dealing with a pretty unusual issue all day. My remote server is running Apache version is 2.4.7 However, when I start setting up directives in the .htaccess files such as this: <...
Thomas Wright's user avatar

15 30 50 per page
1
2 3 4 5
11