Skip to content
Advertisement

Tag: url-rewriting

How to remove .php extension only for pages under a sub directory?

I am trying to remove .php extension for only pages under a subcategory folder of the website. currently: example.com/blog/my-first-blog.php what i want: example.com/blog/my-first-blog/ I have tried the following rule in .htaccess (placed in root) but it still shows .php Answer I figured it out I just had to create .htaccess file under the “/guide/” directory. with the following rule note

How work for RewriteRule in .htaccess (laravel 5.3)

I have made a virtual host as school-laravel.dev My project .htaccess file is as I want if user enters school-laravel.dev/whatever it should be redirect to school-laravel.dev/students How to rewrite this rule above in .htaccess i tried as but its not working Thanks in advance Answer You can use following code in htaccess for redirect. This will #Redirect from old domain

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

Advertisement