All Questions
17 questions
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 ...
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 ...
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 ...
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 ...
-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|...
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
...
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 ...
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 ...
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/?$ ...
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 ...
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 ...
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 ...
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....
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 ...
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 ...
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
...
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 ...