I'm making a website which allows people to upload files, html pages, etc... Now I'm having a problem. I have a directory structure like this:
Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Monday, June 11, 2012
Disable PHP in directory (including all sub-directories) with .htaccess
Check AllowOverride value using PHP?
Is there anyway to use PHP to check the value of AllowOverride too see if .htaccess will have any effect?
Sunday, June 10, 2012
Security: Deny access to .hg/* via mod_rewrite
My website is a mercurial repository with multiple subrepositories. I need to make sure I'm denying access to all files in every .hg directory on the server.
Zend and .htaccess
My default 'zend' app has this default structure
/zend + webroot
/application
/config
/library
/public
.htaccess
index.php
Set HTTP Caching Expiration, Recommended by Google PageSpeed
I ran tests on my website using Google's PageSpeed and it recommends that I "Leverage browser caching" and provided the following resource:
Friday, June 8, 2012
htaccess rewrite on urls without common pattern
In a new project, a website has a set of static html pages. The owner needs to convert them to dynamic ones. Each page has: a text section, a small photo plus some links towards other pages, related to this one.
Differentiate between hotlinking vs user on site
Is there a way to differentiate between a site that is hotlinking an image vs a user that is actually viewing the image on site?
.htaccess to remove .PHP extension (Godaddy)
I have tried to remove the .php extension and nothing seems to work.
mod_rewrite/GoDaddy problem
Ok, so I really don't know much about mod_rewrite and I'm looking over the apache docs and still not figuring this out.
Security: Block bad spiders and bots from access to website using htaccess and HTTP_USER_AGENT
When building an htaccess rule to block common spiders and bots, what HTTP_USER_AGENT headers should be filtered?
Apache Mod-Rewrite Primers?
I am wondering what primers/guides/tutorials/etc. are out there for learning to rewrite URLs using Apache/.htaccess? Where is a good place to start?
Tuesday, June 5, 2012
Quick mod_rewrite help on GoDaddy
This htaccess works fine locally, but on GoDaddy the URL isn't caught by the rewrite engine.
Short URL system: How to redirect the Custom URLs?
I'm trying to make a tinyurl-like service for my company, and so far looks good, but now I have a problem I can't solve.
.htaccess subdomain argument not accessible in query string
I have written the following rules in .htaccess
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com
RewriteCond %1 !^www$ [NC]
RewriteCond %{REQUEST_URI} ^/news/news-details\.php$
RewriteRule (.*) news.php?div=%1
htaccess mod-rewrite to subdomain
I'm using the following to redirect wildcard sub domains to corresponding folders:
Caching Images, JS and CSS in Apache using deflate
I am currently caching my CSS, JS and images using deflate in my Apache configuration.
apache rewrite rules issue for specific pages
I have problem with my .htaccess redirections. When I type:
http://www.domain.com/contact
Monday, June 4, 2012
migrated system with new urls
I am switching system from a MVC to a custom code system. Currently we are using this format for urls:
Using .htaccess to restrict access to files
I have 2 domains hosted on the same account but I want to restrict the second one to not access files.
access denied on localhost .htacces
i have a private section where specific users can login on my system (restricted to 4 users)