Questions tagged [url-rewriting]

A URL rewrite engine is software that modifies a web URL's appearance (URL rewriting). Rewritten URLs (sometimes known as short, fancy URLs, or search engine friendly - SEF) are used to provide shorter and more relevant-looking links to web pages. The technique adds a degree of separation between the files used to generate a web page and the URL that is presented to the world.

Filter by
Sorted by
Tagged with
2
votes
0answers
15 views

We are restructuring some URLs are 301 redirects enough to avoid a massive drop in traffic?

My org is rebuilding a very old, very haphazardly built WordPress site and we are thinking about making some changes to our custom post types and therefore the URL structure will change which is going ...
0
votes
0answers
18 views

IIS URL Rewrite http to https with multiple subfolder

How can I set the correct redirect for all subfolders? Is it happening to me at the moment that everything is working properly, but some that are not found, return to static. This is what my wwwroot ...
0
votes
0answers
17 views

Rewrite local file links

I have *.html files accessible through file:// protocol in browser. Within these files are links to resources, like <img src="file:///c:/users[...]pic.jpg">. This all works fine for ...
3
votes
1answer
75 views

Redirect URL ending in certain `variable=value` query string, to `URL?variable` (i.e., strip `=value`)

I'm trying to create a 301-rewrite for URLs ending with ?amp=1 to nearly the same URL and query string, just stripping the value (=1). Examples: https://example.com/?amp=1 should redirect to https://...
1
vote
1answer
23 views

Subdomain rewrites without using certs that don't support sub domain affecting

I am using LetsEncrypt to generate and renew my certs for my website. Unfortunately, it does not support subdomains. Having said that, I have a ton of rewrite rules that work fine. For example: ...
0
votes
0answers
11 views

It is possible to have a subdirectory redirection while keeping the domain name? [duplicate]

We have a working website under the domain x.domain.tld. We want to add a wordpress to it in such way we have x.domain.tld/blog but install it on another server so we don't touch anything on this old (...
2
votes
0answers
23 views

Problem with URL path when I applied SEO friendly URL [duplicate]

I was working on PHP project and making SEO friendly URL Like, OLD : http://example.com/list_product?q=men-top-wear New : http://example.com/list_product/men-top-wear Here is my .htaccess file: ...
4
votes
1answer
47 views

Mod Rewrite Multiple Query String

I'm having trouble using modrewrite to redirect a URL with multiple strings. I have a PDF handling script. I want to redirect something like: https://www.example.com/pdfs/samplepdf.pdf/open [or /...
4
votes
1answer
71 views

Rewriting a folder name using .htaccess doesn't want to work

I am wondering, why folder renaming doesn't work. RewriteRule ^pl/(.*) public/$1 Let's say I have a URL like: example.com/public/index.html Now I want to rewrite the URL to example.com/pl/index.html ...
1
vote
1answer
99 views

Url changing with htaccess

I have a web presentation with some typical url adresses. Now I need to add a rewriterule for a different languages, examples: domain/club -> do not change domain/club/path -> do not change ...
1
vote
0answers
33 views

Modify rewrite rule to handle four ids rather than just one [closed]

I have rewrite rule which gives id from link to script and it works perfectly: RewriteRule ^index/viewproduct/id/(\d+)$ produkty/index.php?id=$1 [L] I need one more RewriteRule to handle URLS like: ...
1
vote
1answer
117 views

.htaccess Rewrite Wordpress Subdirectory without breaking other subdirectories

So I have WordPress installed in /wp/ but I want all WordPress URLs to be rewritten to appear in the root directory. I currently have this working (see below) but I want to change my .htaccess so it ...
1
vote
0answers
36 views

Can a reverse-proxied Facebook in an IFRAME access the other logged-in Facebook's in other windows and IFRAMEs?

We have set up a reverse proxy to Facebook. We wound up another subdomain on our server and pointed it at https://www.facebook.com using the following web.config. (Redacted slightly for security's ...
1
vote
2answers
36 views

Using two domain names in a single folder

I have inherited an English/French static web site. The original developer created it so all the html files are in the root directory of the English domain and added "-fr" to the French file ...
1
vote
1answer
438 views

Rewrite URL with ID to one file using .htaccess

I have "home" directory as: /var/www/page I need redirect: /var/www/page/index/product/id/9098890 Where 9098890 is the id of product. to one file: /var/www/page/script/index.php I want ...
1
vote
1answer
52 views

Will a .com SSL certificate cover a redirecting .com.ar domain?

we have a website with 2 different domains: www.example.com or example.com and www.example.com.ar or example.com.ar I want all requests redirected to www.example.com. I know I have to create two ...
2
votes
1answer
456 views

How can I limit .htaccess to current directory scope only?

I have something like this: Options -Indexes RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?path=$1 [NC,L,QSA] Order deny,allow ...
1
vote
1answer
33 views

Can I have separate url in internal navigation of website and Sitemap?

I have not so SEO friendly url structure in my internal navigation of website(some technical challenges) but marked each of the page with SEO friendly canonical(through CMS) and these canonicals are ...
1
vote
2answers
53 views

Will /blog/ at the start of the URL path for my WordPress articles help SEO?

I have a WordPress website for a business. And they have many pages, Custom Posts, etc. And they do have a Blog also. At present their blog urls are like this: Main page for blog: example.com/blog ...
1
vote
1answer
48 views

how fix rewrite rule conflict

I am using following rewrite rule and its working fine : 1) RewriteRule ^([^/]*)/?([^/]*)/?([^/]*)/$ estates1.php?pageNum_Clusterb=$3&estname=$1&location=$2 [L] but when add second code in ...
1
vote
2answers
34 views

How do irrelevant parts of restructured URL affect SEO?

I'm new to SEO and not sure how exactly google crawler works If I use the following format for URL: example.com/category/id/name The content of the page is loaded by only the id part, the other ...
1
vote
0answers
15 views

SEO Rewrite , URI Without .php Extension To file [duplicate]

I have website with this output Link : https://domain1.net/estates.php?estname=XXXX&location=YYYYY I want change it to : https://domain1.net/XXXXX/YYYYY I try it with following rewrite rule : ...
3
votes
1answer
223 views

301 redirect rewrite query string in .htaccess [duplicate]

I am trying to perform a 301 redirect in .htaccess and I need to remove the query string ?view=full. Here is what I have that is not working: RewriteRule ^/contact/?view=full$ /contact/ [R=301,L] I ...
0
votes
0answers
19 views

Which URL is best [duplicate]

We are in the process of creating landing pages whose contents will be living in the server whose directory houses mylove.example.com. The URL will be mylove.example.com but for marketing purposes, ...
3
votes
0answers
41 views

NGINX configuration for the same folder protection rewrites in each of thousands of subdirectories

The following code allows me to protect a specific folder with the membership software we're using. The problem is if we have 1,000 folders we need to protect, we need to copy/paste this same code for ...
0
votes
1answer
16 views

URL Rewrite - Does order of directories matter to search engines?

So a pretty straight forward question here. Should the directory structure created from url parameters such as: /color-brown/shape-square/material-wood/ remain consistent? Does it matter if you also ...
2
votes
1answer
2k views

mod-rewrite - sending any URL with ".php/" to 404

I have a substantial number of rewrite rules in place for a variety of reasons such as: disallow indexes, set custom error pages, force non-www, https, strip trailing slash, redirect index.html or....
1
vote
0answers
22 views

How to use the same base url prefix for category and product pages in Woocommerce?

I checked out this article https://docs.woocommerce.com/document/removing-product-product-category-or-shop-from-the-urls/ which explains that it is not good to remove the product and category bases ...
2
votes
1answer
42 views

Can I rewrite to a redirected URL using .htaccess file?

I have a page A. I want to have a page B which is served as a rewrite of page A using .htaccess. Is it possible to redirect page A to page B from .htaccess or is it going to go into an endless loop?
-1
votes
1answer
22 views

Aesthetic URL problem: Website from server02 should look like its on a subdirectory of the main site from server01

www.example.com is on server01 with IP address 192.0.2.123 abc.example.com is on server02 with IP address 192.0.2.21 I actually do not want the subdomain abc. Ideally I want it at www.example.com/...
3
votes
2answers
63 views

Adding IDs to urls to open up namespace - SEO considerations?

I'm working with a site that has millions of pages along the lines of: domain.com/entity/John_Smith domain.com/entity/Google domain.com/entity/HTML One of the problems is that particularly for ...
2
votes
1answer
72 views

.htaccess - RewriteRule for 404 and query

I am very new to this stuff. I have a website with these RewriteCond/RewriteRule directives. Options All -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}...
2
votes
1answer
169 views

How do I create clean URLs such that what is currently in a parameter goes in the path?

My url is http://localhost/store/product-detail.php?p=prod%name%test i want it to look like this http://localhost/store/prod-name-test or something like this as other stores do http://localhost/store/...
1
vote
2answers
396 views

Does Google index page URLs with languages parameters as a different page?

If I implement multilingual access to the resource through the parameter: 1) https://example.com/en/article-1 2) https://example.com/article-1?l=en So, does Google index both of them as a single ...
2
votes
1answer
68 views

htaccess rewriterule not working for old urls for site rebuild

I am struggling to get the rewrite rules working in .htaccess for search links on a property rental website I am working on. The old links are like this: example.com/index.php?proptype=Villa&...
1
vote
1answer
65 views

URL Character Counting - Where to start counting?

I'm rewriting URLs for a website, I know it could affect SEO, but I've no choice but to rewrite them, and 301 redirect the old ones to their new URLs. I want to try to keep the new URLs short and to ...
2
votes
1answer
834 views

How to configure .htaccess to rewrite all requests into a folder, except a list of exceptions

I have an established website with some legacy folders I would like to keep. https://example.com/.well-known/ https://example.com/Music/ https://example.com/Rutabagas/ I've also installed ...
4
votes
1answer
68 views

How would you implement redirects for domain canonicalization, no-www, and HTTPS for IIS 7.5

For the moment I'm stuck with an IIS-server, unfortunately not my best subject (I'm much better w. Apache). We have a site on a Win 2008 R2 Server with IIS 7.5. It's an old site and we are working on ...
2
votes
1answer
137 views

How to rewrite using .htacess when there is a ? (question mark) at the beginning of the URL?

Many JS functions on my site are sending Ajax request to /?something=3213214 but I need to redirect them to /something=3213214 When I do: RewriteRule ^test/(.*) /$1 [R] It does redirect /test/...
2
votes
1answer
37 views

I can't run 2 or more url rewriting rules at once

I was trying to shorten the URL more, but I was removing .php file extension from the URLs using URL rewriting too. I can't run both at the same time. Removing the extensions and trying to shorten ...
0
votes
0answers
35 views

Some links are indexable and some others are not when they are all created equal, why?

I'm trying to create a sitemap. I'm using the Screaming Frog software, but I think that this can be achieved in different ways with other software as well. My links are generated with different ...
1
vote
1answer
345 views

Using IIS URL Rewrite module instead of Global.asax for complex redirect rules

We have a legacy ASP.NET website in which complex redirect rules are coded in Global.asax. Actually this logic processes requests with several optional or variable parts like {http|https}://[www.]...
2
votes
1answer
47 views

Does a new permanent rewrite rule supersede old permanent rewrite rule?

Ages ago we included a redirect in web.config to ensure that pages would rewrite to http://www.example.com/ if the user input, say, www.example.comor variants of it. Recently we changed the site so ...
1
vote
1answer
428 views

How to redirect all requests to HTTPS with SEO friendly URL using Apache?

First of all, I would like to leave remove www and redirect all request to HTTPS like this: RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$...
0
votes
1answer
44 views

Rewrite rule messes up direct links to directories

I have a very simple rewrite rule which does the job: allows link domain.com/index.php?page=NAME to be displayed as domain.com/NAME. The problem is when I try to give direct link to the image www....
2
votes
1answer
264 views

Rewrite rule to give 410 Gone for a specific URL doesn't work

I'm French. A week ago, my website was hacked with the old version (http). The hack created 404 spams and I want to ensure they have "410 Gone" status. My problem on the site is: https://www.example....
0
votes
1answer
34 views

How to change the URL of a wordpress website?

By default, my URL was set to example.com/wp/wp-admin instead of the example.com/wp-admin that I used to remember. Also my website's contents show on example.com/wp rather than example.com. How do I ...
1
vote
1answer
481 views

.htaccess rewrite stops working for javascript files after moving server

We recently moved an old PHP Project from a server using httpd to our regular prod. servers running apache2. In this project we have some reroute rules that map requests either to our index.php file ...
2
votes
1answer
46 views

Do search engines crawl links with query strings?

If I were to have a url like https://example.com/books, that contained several links to urls such as: https://example.com/books?id=foo https://example.com/books?id=bar https://example.com/books?id=...
1
vote
0answers
39 views

Apache VHost rewrite rule not working as it should

I have setup an Apache server inside my domain and have been creating VirtualHost in the httpd-vhosts.conf file. Up until now this has worked without issue, I have a few DNS entries externally that ...

1
2 3 4 5
10