Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
335 views

CodeIgniter / Lost input data, $_POST is empty too

I am in the process of updating the long overdue CI 2.something to CI 3.1.11. So far so good except for the form data which is lost. Neither $this->input->post('usr') nor $_POST hold any values ...
pop's user avatar
  • 3,684
3 votes
1 answer
2k views

Apache dynamic IP whitelist for specific directory and files

I am trying to whitelist IPs dynamically to grant access to a specific directory. A php script will be constantly modyfying the whitelist.txt file to add/remove entries. I know the proper way handle ...
user969622's user avatar
0 votes
0 answers
85 views

.htaccess causing errors, error log empty

I have a .htaccess file here that is from open source bitcoin exchange written in php called wlox. Unfortunately its causing a server 500 error and the error logs are empty. This is what the file ...
Haider Ali's user avatar
1 vote
2 answers
59 views

Redirecting www.domain.com and domain.com to subdomain.domain.com using httpd

I would like to redirect: Situation 1. example.com to subdomain.example.com Situation 2. www.example.com to subdomain.example.com I have put these 2 chunks of code inside my httpd.conf. Only ...
Tommy Lee's user avatar
  • 794
-1 votes
2 answers
98 views

HTTP_REFERER syntax

I'm using this code RewriteEngine On RewriteCond %{HTTP_REFERER} !^https://(subdomain\.)?domain\.com/ [NC] RewriteCond %{REQUEST_URI} !hotlink\.(gif|png|jpg|jpeg|doc|xls|pdf|html|htm|xlsx|docx|mp4|...
Robert's user avatar
  • 19
0 votes
0 answers
62 views

Loop error with Apache mod_rewrite

I need help with Apache2 mod_rewrite. Below is my .htaccess file: AddDefaultCharset utf-8 php_flag magic_quotes_gpc Off php_flag display_errors on php_flag display_startup_errors on Options -Indexes ...
illatif's user avatar
  • 43
1 vote
1 answer
2k views

Forcing HTTP to HTTPS causing 404 error

I have a website based on WordPress, and one section of it is built by external programmers (the backend). I was able to force all connections to go on HTTPS instead of HTTP using a plugin for the ...
MAR's user avatar
  • 593
2 votes
1 answer
5k views

Configuring a RESTful VirtualHost on Apache 2.4 with PHP

I'm trying to create a RESTful API on a VirtualHost on my Apache 2.4 server (on Ubuntu). I have a php file named dbManager.php which I am using a RewriteRule to look like an api directory. It's ...
onigame's user avatar
  • 214
0 votes
1 answer
21 views

Mod_rewrite to direct subdirectory to another URL

I am trying to play with Apache Mod_rewrite and I cant get this to work. I want to redirect xyz.com/blog to xyz.wordpress.com I edited the .htaccess file to add this line. RewriteRule ^blog/?$ ...
geeky_monster's user avatar
1 vote
1 answer
70 views

Affect of mod_rewrite on links without a forward slash?

I have the below VirtualHost and HTML. The purpose of the VirtualHost is to take http://example.com/bla/index.php?id=3 and rewrite it as http://example.com/index.php?admin=bla&id=3. If the URL ...
user1032531's user avatar
  • 26.1k
1 vote
2 answers
77 views

htaccess redirction from www to non-www url with ssl certification

i would like to redirect my site form www to non-www url with ssl certificate. i have write the code RewriteCond %{HTTP_HOST} ^www\.(.*) RewriteRule ^.*$ https://\%1/$1 [R=301,L] that works but if ...
user2825802's user avatar
11 votes
7 answers
4k views

Break HTTP file uploading from server side by PHP or Apache

When uploading big file (>100M) to server, PHP always accept entire data POST from browser first. We cannot inject into the process of uploading. For example, check the value of "token" before ...
Alix's user avatar
  • 256
6 votes
2 answers
6k views

mod_rewrite: How to redirect HTTP DELETE and PUT

Im trying to write a little rest api in php by using mod_rewrite. My question is: How do I handle HTTP DELETE and PUT? For example, the url would be: /book/1234 where 1234 is the unique id of a book....
sockeqwe's user avatar
  • 15.9k
1 vote
1 answer
306 views

mod_rewrite stripping long values from HTTP header

I'm using OpenAthensSP to return IdP metadata that can potentially access our service. OpenAthensSP returns this data in the form of environment variables in the HTTP(s) header, which we then read in ...
Coder's user avatar
  • 3,083
0 votes
3 answers
2k views

mod rewrite everything after domain into get

How can I rewrite everything after the domain name into get if it is not already get? For example : example.com/blah/blah.blah will become example.com/?blah/blah.blah basically all I want to do is ...
Marty's user avatar
  • 1
2 votes
4 answers
2k views

htaccess mod_rewrite

I'm trying to put something with this, whenever I go to a page like: http://www.example.com/character.php?id=3 I want the mod rewrite to change it to: http://www.example.com/character/Jim_Carrey ...
MacMac's user avatar
  • 35.3k
1 vote
3 answers
233 views

PHP how to treat nonexistent URLs on a single entry point site that uses mod_rewrite

I am developing a web site in PHP and I am using mod-rewrite to implement a single point of entry in index.php. From there I am using a dispatch table to dynamically create content for each URL (can ...
user avatar