I would like to prevent search engines from indexing with some specific get parameters. Example: https://www.example.com/mypage.php should be indexed https://www.example.com/mypage.php?myparam=1 should not be indexed I have many pages (more than 10k) with get parameters that are indexed on top of the main page despite sending a no index in the header. I have this in robots.txt: And this in the
Tag: apache
.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
Post Method only posting last value fetched from database
I am displaying list of items(multiple entries) from database on one page. I am trying to post all those values fetched from the database to another php file to add item to cart. But when I press ‘add to cart’ button for any item in the list, it is only sending last item through POST. I know it is because
How Can I correct Broken WordPress Permalinks
I have run into a problem with my WordPress blog. Previously, I could access pages using URLs like https://mywebsite.com/index.php/all. However, something unexplainable happened such that this URL has been renamed to https://mywebsite.com/?page_id=102. I have tried to change the permalink structure under settings and the link breaks. When the link appears as https://mywebsite.com/all it does not load in the browser. When
How to redirect all requests to a PHP file inside a subdirectory in apache2?
My document root is /var/www/html/. I created a directory called myapi inside like /var/www/html/myapi. The folder structure in /var/www/html/myapi is like I want all the requests such as http:localhost/myapi/books would be redirected to the index.php inside the src folder. my current .htaccess setup: RewriteEngine is already switched on. But it doesn’t work and the server does not respond. May I
Remove query string parameter to create a more user-friendly URL
I have this .htaccess file and I have no knowledge with mod_rewrite, What I want to achieve is to have localhost/viewticket/${id} instead of localhost/viewticket.php?id=123 I have tried many .htaccess rules but none worked except this one that hides .php in my URL. Answer I created this one for you, just erase yours and copy this one enjoy^^
How to $_GET[‘id’] from a clean url like “example.com/products/123/title-of-this-product”?
I’d like my URL to look like this: The actual URL is this: The .htaccess file correctly interprets my URLs so that users who are on this page only see the clean URL. However, if I try to use $_GET[‘id’] on the products.php page, the script crashes because it doesn’t recognize any id in the URL. .htaccess code: products.php code:
Android app communication with local apache server
I am new to Android dev, I have started using Android Studio with Kotlin few days. I run into an issue today which is : how can my app communicate with my local server (XAMPP : Apache and MYSQL) I am running Windows 10, and using my real physical phone instead of the emulator (API 30) since the emulator works
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