Skip to content
Advertisement

Tag: mod-rewrite

Laravel Shared Hosting .htaccess

I am trying to deploy a Laravel project onto a share hosting, I’ve managed to get most of the hard work done but I cannot strip off the /public directory without a Forbidden issue. The website works and shows same pages for these links www.mywebsite.com/test/index.php www.mywebsite.com/test/public/ But without the /index.php It returns -> Currently my .htaccess looks like the following.

Pretty URLs with .htaccess

I have a URL http://localhost/index.php?user=1. When I add this .htaccess file I will be now allowed to use http://localhost/user/1 link. But how about http://localhost/index.php?user=1&action=update how can I make it into http://localhost/user/1/update ? Also how can I make this url http://localhost/user/add ? Thanks. Sorry I am relatively new to .htaccess. Answer Thanks for the idea @denoise and @mogosselin. Also with @stslavik

rewrite uppercase url to lowercase url htaccess

I want my urls that contain uppercase characters to be redirected to lowercase url’s. Unfortunatly i don’t have access to the httpd.config file. So i tried this method to rewrite the urls with the htaccess file: http://www.askapache.com/htaccess/rewrite-uppercase-lowercase.html . But it adds extra / because it’s a loop and also it doesn’t work (504 error) when the url consists of more

Custom Error 403 Page PHP

I created a .htaccess inside a directory in which I don’t want the files to be directly accessed. It works and fires the default 403 page (Access forbidden!) of the Apache server. How can I create a custom 403 page? Thanks! Answer In your .htaccess file you can specify what document you want as your default 403 error document. Here

How to ban all executable files on Apache

I would like to find out the most effective way to ban any executable files from one specific sub folder on my server. I allow file uploads by users into that folder, and would like to make that folder accessible from the web. I have the root folder pretty much locked down with mod_rewrite. In that one unprotected sub-folder I

Advertisement