Category : .htaccess

I am trying to redirect the main domain to the folder public directory by .htaccss. I wrote the below code on .htaccess file. but the index.php file is downloaded when I hit the domain. RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?xxx.com$ RewriteCond %{REQUEST_URI} !^/foldername/public/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /foldername/$1 RewriteCond %{HTTP_HOST} ^(www.)?xxx.com$ RewriteRule ..

Read more

I have configured httpd in my fedora and I checked everything is true but i get access forbidden I have tested everything about .htaccess but still getting access forbidden. also, my laravel folder permissions are correct. I tested a sample project while installing httpd it worked perfectly with no ‘access forbidden’ message. this is my ..

Read more

Everyone. I am using the correct a .htaccess file and put it into the Laravel directory and now my ubuntu server has the apache2 process. All is okay but not working correctly and executed the PHP code of my project. What is the solution? I will attach my .htaccess file. <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ..

Read more

Hi I would like to know how to migrate my apache2 .htaccess rules to nginx here is my .htaccess code RewriteEngine On RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ ^$1 [N] RewriteCond %{REQUEST_URI} (.w+$) [NC] RewriteRule ^(.*)$ public/$1 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ server.php Sourc..

Read more

Hi I would like to know how to migrate my apache2 .htaccess rules to nginx here is my .htaccess code RewriteEngine On RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ ^$1 [N] RewriteCond %{REQUEST_URI} (.w+$) [NC] RewriteRule ^(.*)$ public/$1 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ server.php Sourc..

Read more

I want to hide id from URL http://example.com/photo/1234/image-name I want it to change like this http://example.com/photo/image-name Is that there any way to remove or replace id from url. CONTROLLER: public function show($id, $slug = null) { $response = Images::findOrFail($id); if (Auth::check() && $response->user_id != Auth::user()->id && $response->status == ‘pending’ && Auth::user()->role != ‘admin’) { abort(404); ..

Read more

I am trying to remove id from the url. My urls’s are something like this, https://www.example.com/p/29/web-test But, I want the url like https://www.example.com/p/web-test And my route is, Route::get(‘/p/{id}/{any}’,’[email protected]_page’)->name(‘dynamic.page’); I have tried several codes .htacces like RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ p/$1 [L] But its not working, can anyone please help me out, ..

Read more

I’m developing a Laravel application and suddenly it is not receiving the Authorization header with token anymore. This is my .htaccess file script. <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} ^(.+)$ RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] Header add Access-Control-Allow-Origin "http://localhost:8080" Header add Access-Control-Allow-Credentials "true" Header add Access-Control-Allow-Methods ..

Read more

http://oktrad.dotdigital.pk/t/Alemán%20(Alemania)-Alemán%20(Austria) basically i want to remove %20 from url. There no any Query parameter in url. i want remove %20 to underscore ‘_’ or same as space. http://oktrad.dotdigital.pk/t/Alemán (Alemania)-Alemán (Austria) http://oktrad.dotdigital.pk/t/Alemán_(Alemania)-Alemán_(Austria) Sourc..

Read more

I have site that run on Laravel 8. Turning on developer console I got this symptom accessing root URL https://example.com didn’t give any error accessing login URL https://example.com/login didn’t give any error after login and redirected to dashboard URL https://example.com/dashboard give 404 errors one of it was https://example.com/vendor/livewire/livewire.js (404 error) but accessing https://example.com/public/vendor/livewire/livewire.js is working ..

Read more

My laravel project is throwing error on sub-domain of hosting. My code is working fine on other hosting’s sub-domain. However, on this here is shows error as show in image below.enter image description here. My .htaccess file <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule ..

Read more

I have a WordPress installtion on an apache server /var/www/html/. Within this folder (WP root), I’ve created a subfolder beta and in this folder have a Laravel 8 installation. Separately (on a root domain/subdomain), the Laravel installtion works fine, but in my case it doesn’t. The first issue was with the public folder of laravel ..

Read more

Older version of laravel here, 5.7. I have a situation where I have a url like this http://127.0.0.1:8000// I have a catch all of this Route::get(‘{uri}’, [‘uses’=>’[email protected]’])->where(‘uri’, ‘(.*)’); The URL that comes into the render method is ”. I’m not quite sure the best way to take http://127.0.0.1:8000// and redirect that to http://127.0.0.1:8000. .htaccess doesn’t ..

Read more

I have this .htaccess file in my root laravel folder, site is hosted in subfolder but url is like this : https://maindomain/public/laravelsubdirectory <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Force SSL RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ ^$1 [N] RewriteCond %{REQUEST_URI} (.w+$) ..

Read more