Directory-level configuration file used by Apache web servers.

learn more… | top users | synonyms

1
vote
0answers
27 views

Forcing SSL and WWW using .htaccess

I would like to know if this code in .htaccess for forcing SSL and WWW in URL is correct, because with another code I usually get redirect loop, e.g. ...
3
votes
1answer
84 views

htaccess for URL remapping, caching, and compression

I have been collecting snippets from all over the place and then put them all together creating the following .htaccess file. I really don't understand if what I have done below is good/should work ...
12
votes
1answer
239 views

Opinions on my HTML structure

I have spent the last 6 months as I am studying web development in college to build a website template that is responsive and accessible from as many devices and browsers as possible. I would really ...
3
votes
1answer
90 views

Review URL-prettifying .htaccess file

Can anyone please review the following .htaccess file and let me if it is correctly put together? What I think it does: So it direct to a custom 404 page Remove ...
2
votes
0answers
421 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 ...
2
votes
2answers
302 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 ...
2
votes
1answer
100 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: ...
6
votes
1answer
186 views

Canonicalize URLs for static website

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. ...
5
votes
1answer
163 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? ...
6
votes
2answers
4k 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 ...