skip to Main Content

Apache – Deny direct access to executing script

I previously had below which worked ok, RewriteEngine on RewriteRule ^([0-9]+)/?$ /news/index.php?post=$1 [L,QSA] But I don't want it to open like this https://example.com/news/index.php?post=123456 I want it to open only in such a way that it only allows numbers https://example.com/news/123456 is…

VIEW QUESTION

Installing Laravel 10 in a Subfolder

I am attempting to install my Laravel 10 project in a subfolder so that I can access it at example.com/laravel-project/ instead of example.com/laravel-project/public/. Here is the .htaccess configuration I tried in the /laravel-project/ directory: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$…

VIEW QUESTION

Apache – Pretty URLs with .htaccess rewrite engine

Hej, I'm trying to achieve a pretty urls for my site with rewrite engine. The goal is this - mysite.dk/da, mysite.dk/da/success and mysite.dk/da#scroll. So far my htaccess file looks like this: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule…

VIEW QUESTION
Back To Top
Search