The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
2answers
39 views

WebSite stucture with PHP [closed]

Can you help me to write my rewrite rules for this page. When I write : contact.html?id=2 I want get : index.php?location=contact&id=2 That's my index page. <?php ...
0
votes
0answers
18 views

Send default 404 error page when Referer does not match

Coming from this question on IT Security SE, I want to do the following in .htaccess for Apache: If the Referer is NOT SecretString, send HTTP status 404 with the default (= not a custom) error page. ...
0
votes
0answers
35 views

Automatically redirect /index.php files to their URL directory with .htaccess

The requirements: Work inside .htaccess (preferably via mod_rewrite) Redirect requests from /any/directory/index.php to /any/directory/ Make sure that /index.php-with-stupid-stuff-here does not get ...
2
votes
2answers
76 views

Is it ok to use PHP's strpos and substr altogether in one statement?

I am using PHP to build a REST API. I want to receive requests from the URL in the following format: http://mydomain.com/api/format/method?app_id=value&call=encrypted_request So, I have modified ...
1
vote
1answer
77 views

Can my router code be improved?

I have created a nice url structure for my site. In my .htaccess I have: FallBackResource /index.php And in my router class I have: class init { function __construct($url) { $URLElements = ...
3
votes
0answers
95 views

Can my .htaccess be improved? (better performance? shortened?)

I want to "canonicalize" URLs for my static (files and folders) website. The 'Aims' describes what I want to accomplish. The 'Code' gives my current .htaccess. Everything works right now, but I ...
5
votes
1answer
107 views

Suggestions on how to improve this .htaccess file for page load speed

Here is my standard .htaccess file, any suggestions on how I can improve it with regards to page load speed? Would gZip instead of DEFLATE make any sort of difference? ExpiresActive On RewriteEngine ...
5
votes
2answers
3k views

MVC router class

Below is what I have come up with for a router/dispatcher system for my personal framework I am working on. Can you please review and tell me any improvements that could be made? The first part is ...