Questions tagged [url-rewriting]

A web address transformation tool, known as a URL rewrite engine, is designed to alter the appearance of URLs. Its purpose is to create shorter, more aesthetically appealing links for web pages, redirect users from outdated URLs to updated ones, and enhance the readability of URLs by simplifying their format. This technique introduces a level of abstraction between the files responsible for generating a webpage and the actual URL visible to users worldwide.

Issues arising from URL encoded characters that fail to get rewritten

I have set up rules for dynamic redirects to point old URLs to new locations. However, I encountered an issue where the redirect failed when URL Encoded Characters were present in the URLs. Here is an example of such URLs: www.example.com/ebc-drama-yebet- ...

Configuring IIS Rewrite can be easily achieved by following these simple

My project utilizes PHP and Angular, hosted on IIS. I have enabled the html5Mode in Angular, allowing me to use routes like localhost/home instead of locahost/#/home. The issue arises when I copy and paste the URL (for example: http://localhost/home) into ...

Angular backslash is encoded

Experiencing the same issue as this individual: angularjs-slash-after-hashbang-gets-encoded The URL is getting encoded and not routing correctly, causing it to fall to the otherwise in my route config. I have not been able to identify the root cause yet, ...

Dynamic jQuery URL truncater

Is there an on-the-fly URL shortener similar to Tweetdeck available? I have come across several jQuery and JavaScript plugins that can shorten a URL through services like bit.ly when a button is clicked. However, I am looking for one that shortens URLs aut ...

Concealing the presence of filename.php within the URL

Currently, I'm facing difficulties with hiding the URL. Specifically, I want to change it from http://example.com/products/product.php to either http://example.com/products/ or http://example.com/products/product/. I attempted to resolve this issue by usi ...

Achieving a URL structure similar to a blog post (such as www.abc.com/how-to-learn-php) in Laravel 5.5 - Step by

I am looking to create a personalized profile URL for users resembling a blog post format (www.abc.com/profile/tom-cruise-brad-pit). Every user in the database has their own unique identification, but I prefer not to display this ID in the URL. ...

Enhance permalink with custom post types' meta values through appending or prepending

How can I add meta values to custom post types in permalinks for my website, www.abc.com? Specifically, I want to include the date as year/month and the name of the company in the permalink for my custom type posts. I am expecting the final permalink stru ...

Update the URL by adding additional parameters for increased functionality

I have made some changes to these URLs http://deia.info/category/calendar/10/ Now they look like this: /index.php?task=browse_posts&catid=$2 I achieved this using the following code in the .htaccess file: RewriteRule ^category/(.+)/(.+) /index.php?ta ...

.htaccess rewrite rule not functioning properly in the absence of a trailing slash in

I have the following URLs: www.website.com/index.php?section=index www.website.com/index.php?section=freebies www.website.com/index.php?section=deals www.website.com/index.php?section=articles and the pagination URL parameter for each page is set as "pag ...

Create an .htaccess RewriteRule that can generate a URL with two parameters in any order

I am facing an issue with the URL structure containing 2 parameters https://mywebsite.com/folder/subfolder/page.php?id=999&title=this-is-a-test I require a rule to transform the above URL into the following format: https://mywebsite.com/page/this-is ...

Angular URL rewriting for optimal performance

Is it possible to rewrite an Angular URL like "www.mycompany.com/employee/{78}" so that when clicking on the employee and trying to open it in a new tab, it uses the base URL "www.mycompany.com/index.html/employee/78"? <rule name="main rule 2" stopProc ...

Is there a way to modify a URL through .htaccess?

Is there a way to rewrite a URL using a .htaccess file? For example: --to--> I am trying to figure out how to accomplish this using the .htaccess file. ...

Passing a URL variable to the page and rewriting the URL

Is there a way to transmit data through a custom link in an email to my PHP website? For example, could I send information like this: Then, once the link reaches my site, can it pass along the data and update the URL to make it appear clean and concise l ...

Avoid altering URLs that are file paths

# These configuration settings direct all traffic, excluding specific files, to the dispatcher Options +FollowSymLinks RewriteEngine On RewriteRule ^(.*)$ index.php [NC,L] The issue is that it also directs specified files to the dispatcher :( Is there a ...

obtain the subdomain as a query parameter

Hello everyone! I am currently in the process of configuring my web application to provide users with unique URLs like uniquename.mysite.com and anotheruniqname.mysite.com. I would like to be able to extract the subdomain section of the URL using a PHP sc ...

Unable to modify the URL structure for an MVC project

I have been trying to find a solution by googling, but I am stuck here. Options +FollowSymLinks RewriteEngine On RewriteRule ^index.php|style.css|img.png$ - [L] # RewriteRule .* index.php [L] RewriteRule ^(.*)$ index.php?params=$1 [NC] When I v ...

When completing a form submission, make sure to eliminate the %5B%5D from the

Whenever I submit a form with multiple checkboxes that share the same name, the resulting URL format is as follows: www.example.com/search.php?myvalue%5B%5D=value1&myvalue%5B%5D=value2 Is there a method to eliminate the %5B%5D in the URL and make it m ...

Setting up paths in NextJS can be easily done by following these steps

I am facing a situation where I have the addresses /blog/post-1 and /blog/post-2, but I wish to rewrite them to /post-1 and /post-2 respectively. In order to achieve this, I made changes in the next.config.js file as shown below: async rewrites() { retur ...

Page not found: The requested file does not exist

Apache web server is claiming that the page we are attempting to reach is missing, even though we are certain it is not. It gets even more puzzling as only directory names seem to be causing issues. It's not a file permissions problem be ...

Modify a specific URL within the .htaccess file without relying on a specific pattern

I am looking to transform one specific URL on my Joomla website into a more user-friendly format. The current URL is: www.example.com/index.php?option=com_mycomponent&view=article&id=10&nav_button=0&article_layout=1&Itemid=503 and I w ...

How to redirect users from page.php to a different page using nginx

Here is the current server block configuration I am using: server { listen 80; server_name petpal.co.il; root /usr/share/nginx/petpal; index index.php; rewrite ^/([a-zA-Z]+)\-([0-9\-]+)$ /$1.php?page=$2? last; rewrite ^/e ...

What is the best way to conceal content within a URL while still transmitting it to the server using node.js and express?

I have been trying to figure out how to hide certain content from the URL, but still need to send that information to the server in my Express app. So far, I haven't found any solutions that work. For example, if I have a URL like www.abc.com/viewblo ...

ReactJS rendition function fails to initiate

Currently, I am working on resolving the NestJS CORS issue. After some research, I have found that using rewrite is the best solution and decided to test it out. Following the instructions provided in this documentation enter link description here. Howeve ...

Steps for transforming domain.com/#!/url into domain.com/url are outlined below. Firstly

Can someone help me figure out how to change the link structure from domain.com/#!/home to domain.com/home? I tried using htaccess but had no success. After researching online, I learned it is referred to as "ajax crawling" but I couldn't find a solut ...

PHP htaccess error: Rewrite rules causing 500 ERROR for nonexistent pages

I created a website that cleverly hides the .php extension using RewriteRule and allows the script to determine parameters based on slashes. For example: The main script is deals.php which processes parameters such as new york, Groupon, and the deal ID. ...

Can the .htaccess files be merged together?

Currently, I am facing the challenge of overhauling an existing website that is riddled with spaghetti code and relies on rewrite rules to create friendly URLs. Unfortunately, there are critical issues within the architecture and database structure that c ...

URL Rewrite Causing Path Problem

Encountering an issue with URL REWRITING on my Debian/Nginx/PHP server. Screenshot of the image issue Facing problems with displaying images. My Project Structure Class css img ... and the file.php here Non-functional Approach / Functional Approach Th ...