Category : .htaccess

I am working on installing a new Laravel 8 project on GoDaddy, using a shared hosting Apache cPanel server. This walkthrough was used: https://medium.com/backenders-club/how-to-host-a-laravel-project-on-a-shared-hosting-via-cpanel-d955d32c528e After moving the project directory to the cPanel root directory, and moving my Laravel /public files to the cPanel /public_html directory, I’ve got the server spun up and am able to ..

Read more

I have images on my server, some of them uploaded using Flutter (Dart) and others uploaded using Laravel (PHP). The problem is that most of the images are empty when accessing them but they exist on the server and I can see them and open them from cpanel. Examples of empty images: https://clinicalibya.com/images/advertisements/1617909384cpd%20device%20logo.png https://clinicalibya.com/images/receipts/1617913147scaled_db3b4b6b-eb71-4983-a8fa-14dbdf826b677185714734801956022.jpg Notice: ..

Read more

I hope i can finally get help over here. i want to forward all request from old path to new path and retaining the method and queries. OLD URL PATH: [POST|GET|PUT|DELETE]: mydomain.com/public/api?key=value Desired URL PATH: [POST|GET|PUT|DELETE]: mydomain.com/api?key=value Please can any one help me with the .htaccess code to achieve above idea. Sourc..

Read more

I have a domain alias that I want to stay as it is, but I want to redirect the main domain url. http(and s)://www.alias.maindomain.com -> no redirect http(and s)://www.maindomain.com -> redirect to given url I have a Laravel project and this is my htacess. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule "^http://www.alias.mainsite.com" "http://www.aliasredirect.com" RewriteRule "^http://www.maindomain.com" "http://www.maindomain.com" ..

Read more

I have deployed my Laravel application in CentOS7,Apache and LAMP. Created two subdomains and mapped the directories like as below Subdomains abc.example.com -> /var/www/abc.example.com/public_html/public xyz.example.com -> /var/www/xyz.example.com/public_html/public Virtual Host Configuration Created virtual host configuration files for each subdomain. For example for abc.example.com created the file in /etc/conf.d/abc.example.com.conf and in /var/www/abc.example.com/public_html/.htaccess having the following entries. public_html/.htaccess ..

Read more

Hello there I have 2 folders inside public_html ex.(mainfolder and subfolder). Inside my public_html same level with my 2 folders, I have an .htaccess file like this. RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteOptions inherit Options -Indexes # php — BEGIN cPanel-generated handler, do not edit # Set the “ea-php73” package as ..

Read more

I am getting a file not found using this below code function getVideo(Property $id) { $video = Storage::disk(‘local’)->get($id->video); $response = Response::make($video, 200); $response->header(‘Content-Type’, ‘video/mp4’); return $response; In my local it is working fine. But in production it is giving error. I checked storage/video directory. The file is present there. I am using apache and my ..

Read more

I’m trying to setup my laravel application on different server centos 7 running httpd my old configuration on other servers: i always setup document root to be in "laravelProjectDir/public" however in this server i’ve tried the following: here is my apache config file: <IfModule mod_ssl.c> <VirtualHost subdomain.domain.com:443> ServerName subdomain.domain.com ServerAdmin [email protected] DocumentRoot /home/MyUser/public_html/subDomain/public2 <Directory /home/MyUser/public_html/subDomain/public2/> ..

Read more

up media my website root link But it also works with the following link https: // upmedia.ir/ public What should I do to not open the site with the address / public? my public/.htaccess codes <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* – ..

Read more

Currently I have this working sample link https://sample.com/product-landing?id=1 but on site:google.com it is detected as https://sample.com/product-landing?id=1/homebrewing now I’m trying to redirect it like this Redirect 301 /product-landing?id=1/homebrewing https://sample.com/product-landing?id=1 but it’s not working my other redirect codes like this Redirect 301 /wine https://sample.com/mybeer is working properly. How come? Sourc..

Read more

I have changed my eCommerce site but facing few SEO issues with products and category URL http://mart.samishleather.com/product-categories/slug/slug I need to change the only "product-categories" externally fro SEO reason so its need to be changed to http://mart.samishleather.com/category/slug/slug i have tried <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^(.*)product-categories(.*)$ /$1category$2 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ..

Read more

There is my .htaccess code: RewriteEngine On #This rule work perfect RewriteRule ^([^/.]+)/([^/.]+)?$ single.php?p=$1&id=$2 [NC,L] #This rule not work RewriteRule ^([^/.]+)/([^/.]+)?$ categories.php?x=$1&id=$2 [NC,L] #This rule not work RewriteRule ^([^/.]+)/([^/.]+)?$ subcat.php?q=$1&ccsn=$2 [NC,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f #This rule work perfect RewriteRule ^(.*)$ $1.php [NC,L] And want to doing like href link according to make ..

Read more

I need help forcing Laravel 5.7 on my site to use https. I’m on a shared host, and this morning my hosting provider "upgraded" the server I’m on from cPanel to Site Tools. In the process, my custom Laravel app got broken. My hosting provider hasn’t provided much help, and I’ve been searching forums all ..

Read more

One of my project someone trying to access my index.php file in laravel. Logs:- { "ip":"45.155.205.108","url":"/index.php?s=/Index/thinkapp/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21", "agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" } { "ip":"45.155.205.108","url":"/?XDEBUG_SESSION_START=phpstorm", "agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" } { "ip":"54.81.156.74","url":"/", "agent":"python-requests/2.24.0" } anyone, please advise what security configuration needs ..

Read more

As search by parameters, I want url display subdir instead parameter like this: Here params url : search/?genre=a&pref=b&city=c&sticking&=d And here is subdir url after convert for display: search/a/b/c/d In the case search url has less than 4 params, it can be converted to some urls like this: search/a/b/c search/b/c/d search/a search/b … Is there any ..

Read more