Skip to content
Advertisement

Tag: .htaccess

.htaccess – Permanently redirect to root when the website is accessed with mysite.com/index.php with no query string parameters?

I am using a template on my website. This template is designed in a way where everything is in the index.php file but the functions are executed based on the query string which is stick to the index.php file. I want to permanently redirect to the root mysite.com when my site is accessed with index.php with no query string parameters,

how to get url last part after slash as get value in php

My url is look like: http://localhost/event_manage?slug=hello and last value as like hello So that page is in index.php when i go http://localhost/event_manage/hello and shows error because there is no folder as named hello. But i want this hello is like GET value When I go http://localhost/event_manage/hello I tried in .htaccess file: But it still shows error and couldn’t pass the

can not hide X-Powered-By with expose_php

I want to hide my php version in response headers and for that I changed expose_php to off but it does not work and I added Header unset X-Powered-By to my htaccess file but in did not work either can you guide me for that? Answer and I added Header unset X-Powered-By to my htaccess file but in did not

Serve file from cache folder if it exists, otherwise rewrite to “index.php” using .htaccess

Suppose in root directory I have one file (called index.php) and one folder (called caches). I want that if the file exist in caches folder serve that file (caches/xxx.html) otherwise request send to index.php. For example I will send request to server: https://example.com/how-to-do and Apache search first in cache/. If how-to-do.html exists then send (rewrite Apache) how-to-do.html otherwise send request

How to integrate laravel8 project inside wordpress project cpanel?

I’ve wordpress project in (html_public) folder, and my domain run project fine, I want integrate laravel8 project inside the wordpress, so that both run in the same domain like That: WordPress URLs: https://example.com/wordpressHomepage https://example.com/AnotherwordpressPage Laravel URLs: https://example.com/public/LaravelPage https://example.com/public/LaravelPage/Id Wordpress && LaravelApp path in cpanel: Wordpress .haccess: Laravel .haccess in /public: wordpress index.php: Laravel index.php in App/public/index.php: please any help? Answer

.htaccess is causing 403 on one link only

Bit of an odd one and I feel it must be answered but I can’t seem to find it. I have the following in my .htaccess file on a custom PHP site (NOT WORDPRESS): I cannot work out why “gallery” only is giving me a 403. Both work as expected and go to the desired pages. However Redirects to And

Advertisement