Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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 ...

0
votes
1answer
10 views

Nginx url rewrites for changed shop categories

We recently moved from Magento 1 to 2, during the move we cleaned up our category urls to be more consistent. For instance we changed: /mens/mens-accessories/mens-wallets to : /mens/accessories/...
1
vote
0answers
17 views

nginx rewrite rule not applied (using contao cms)

I am trying to make a redirect for https://mypage.com/foo to https://mypage.com/bar while still keeping https://mypage.com/foo in the browser url. I have tried several combinations of different ...
0
votes
0answers
7 views

Best way to rewrite URL? [duplicate]

Which one of the following URLs has the best influence on SEO? http://example.com/post-ID/ http://example.com/title-of-this-post http://example.com/post-ID/title-of-this-post http://example.com/...
2
votes
1answer
26 views

How would you write an http to https redirect rule for web.config on IIS8 that would go directly to preferred domain with www.?

I have a site that we just setup with SSL and have a redirect rule set up in web.config. We also use the www. as the preferred domain. The problem I have is I want to skip the middle step in the ...
1
vote
1answer
41 views

Why hide .NET URL extensions and make them appear to be .html?

I'm new to the web engineering and I have done some searching for URL/Domain masking. In my company, my HOD asked one question during meeting and wants the answer in the next meeting. He asked that ...
1
vote
1answer
61 views

RewriteCond %{HTTPS} !=on is not working even though RewriteCond %{SERVER_PORT} !^443$ works

I have a requirement to check for non HTTPS URLs in htaccess. My understanding is that RewriteCond %{HTTPS} !=on will match all URLs that are not HTTPS. But upon testing, I find RewriteCond %{HTTPS} !...
1
vote
0answers
23 views

Error in SEO Friendly URL [closed]

I have below url structure http://example.com/blog.php?blogURL=user-already-has-more-than-max_user_connections-active-connections and I want to below http://example.com/blog/user-already-has-more-...
1
vote
0answers
12 views

How do I access the wp-admin interface of a site that lives inside a joomla folder, using IP address / siteground server URL?

For historical reasons, we have several sites that live inside the public_html folder of a different site (all hosted on sitegrounds). To complicate things up, the root domain has a name that is the ...
1
vote
1answer
33 views

www subdomain cannot be in subdirectory, how to organize files on server?

I have just switched hosting providers and stumbled across a limitation that bugs me. Previously I had the following mapping between domains and files on the webserver: example.com → /web/...
1
vote
1answer
49 views

Apache rewrite existing rewritten url [closed]

I know how to create rewrite rules in Apache but what I don't know is how to rewrite a previously rewritten url. This is an old URL /boats-for-sale/fairline-squadron-55/1280 and I need to redirect ...
3
votes
1answer
67 views

HTTPS redirect, exclude script parameters from URL

My goals: 1. http://example.com/page/index.php -> https://example.com/page/ 2. http://example.com/page/ -> https://example.com/page/ 3. http://www.example.com/page/ -> https://example.com/...
4
votes
2answers
186 views

How to force ssl and www for a subdomain as an independent domain?

I have own the example.tld . I want to force SSL and https for root-domain and all of its subdomains. I have used below code in .htaccess file of root-domain: RewriteEngine On RewriteCond %{HTTPS} ...
1
vote
1answer
292 views

IIS HTTP/S rewrite with SSL offloading non-standard local port

I posted this in a different forum and got nothing, so I'm a bit desperate. Here is my scenario: IIS running sites on 80 and 443 - external.foo.com and https://external.foo.com On the same node, a ...
1
vote
0answers
32 views

What's the best practice URL Path with multiple occurences of the same parameter?

Case User searches on a website for "cake" and filters the results via two categories: "united states" and "germany". Researched best practices SEO relevant and as short as possible URL if possible ...
1
vote
0answers
33 views

Remove non-existent language directory from URLs under nginx

I've got URLs like this: /lang/path-to-file.ext and I want to remove the "lang" because it doesn't exist: /path-to-file.ext How do I do that on an nginx server?
2
votes
1answer
32 views

Redirecting from one page to another page on my website causes 404 error after using .htaccess file

Currently I'm working on a PHP blog. Where I have used an .htaccess file to get a clean URL, here is the code: RewriteEngine On RewriteCond %{HTTPS} !=off RewriteCond %{HTTP_HOST} ^example\.com$ ...
4
votes
1answer
118 views

How to use rewrite rule to create exception rule for https redirection for directory ./well-known

Here is my situation: Server A: support.example.com -> port 80 is forwarded to this server Server B: hr.example.com Both are running apache2. For server B I want to use Let's encrypt. I want to ...
2
votes
1answer
68 views

Googlebot URLencoding longtail URLs which is causing server errors

My Google search traffic has been growing consistently for months without any hiccups. Then a few days ago, Google dropped my traffic by about 80% in one day. The traffic would then later rebound ...
4
votes
1answer
267 views

Nginx rewrite problem - displaying same page with or without .php extension after rewrite

I have implemented the following Nginx code: location / { try_files $uri $uri.php $uri/ @extensionless-php; index index.html index.htm index.php; } location ~ \.php$ { try_files $uri =...
1
vote
0answers
32 views

If I link to clean URLs based on the page title but redirect to URLS with ids as part of a site migration, is that bad for SEO?

I'm importing stuff from a Drupal site that has a couple of alias URLs: /node/123 /my-alias-node-title My new site is a very simple CMS handmade in PHP by me as a practice. In the new system, the ...
3
votes
1answer
110 views

Possible to match special characters with mod_alias and `Redirect` directive?

I’m using Apache 2.4.6 with mod_alias and have a website which is receiving traffic from a link on another website that I have no control over. The other site’s link is poorly formed and it causes ...
1
vote
0answers
49 views

Method to redirect website subfolder to new website in IIS

We currently have a website, let's call it https://supersystem.example.com We also offer customized versions of the website to clients, in the past we would throw those custom files into a sub3folder ...
1
vote
1answer
39 views

.htaccess Rewrite whole dir contents to another

I am trying to rewrite the whole contents of a directory to the home url. so, if someone visits www.example.com/bnn27sh32j@d299/gold it should take them to www.example.com/gold I have tried: ...
1
vote
1answer
404 views

How to keep question mark in URL rewriting with a GET method?

I am trying to use URL rewriting to rewrite search-en.php?q=abc to pages-afficher-recherche.php?lang_abbreviation=en&q=abc and I did RewriteRule ^search-([a-zA-Z]{2})\.php\?q\=([a-zA-Z0-9_-]*...
1
vote
1answer
375 views

Forcing trailing slash at end of “fake” folders

The working codes that I've found here most put a slash in everything. I just need force trailing slash in these "fake dirs" (that are part of my rewriting scheme (only directories)) and keep ...
0
votes
2answers
45 views

How to redirect website with SSL (HTTPS) to without SSL (HTTP)?

I have a WordPress site on a domain that used to be HTTPS, example domain https://example.com. I now want to remove HTTPS temporarily. How do I do that? I have tried to add the following to my ....
6
votes
1answer
410 views

Rewrite wildcard subdomains in .htaccess to corresponding folders on the main domain while preserving the subdomain

I'm trying to rewrite a subdomain to a folder/file like this: name.example.com -> example.com/profile/name foo.example.com -> example.com/profile/foo xyzzy.example.com -> example.com/profile/xyzzy ...
1
vote
1answer
32 views

dynamics urls - redirects or rewrite and page SERP position

I'm trying to get my head on this, our site have thousands of links, is an e-commerce site, where products titles require changes on regular basis to get the best of SEO... you know, as usual, we ...
4
votes
3answers
268 views

Rewrite to SEO friendly URLs for language negotiation with type-map files on plain html files using .htaccess

When visiting the website www.example.com/ the visitor should be redirected to the correct language version, e.g. www.example.com/en for english and www.example.com/es for spanish. My current ...
3
votes
1answer
175 views

How do I do an htaccess rewrite on an internal URL without Google crawl giving me a soft 404 error?

Here is my issue. I have a rewrite rule in my htaccess like this: RewriteRule ^(news|review|feature|editorial|podcast)/([0-9]+)/(.*)$ /article.php?id=$2 [L] Basically what it does is take in a URL ...
-1
votes
1answer
178 views

In IIS 7.5, how do you redirect an HTTPS domain to the canonical domain?

So I have a site configured with example.com:80 and www.example.com:80, as well as a certificate for port 443. When a user goes to the www.example.com:80 or 443, which has the SSL certificate ...
0
votes
1answer
114 views

How to redirect port 80 on server A to 443 server B

I'm wondering how can use my server A to redirect different URL's to the respective server. Here is my setup: Server A: apache 2.4 on ubuntu 16 Server B: apache 2.4 on windows 2012 Port 80 is ...
0
votes
1answer
36 views

Use same domain for two websites, depending on customer IP [closed]

Here's the scenario I want to know if possible and how: Scenario Domain (www.foo.com) at one hosting provider. Two websites, one at www.bar.com and another one at www.biz.com, each at a different ...
0
votes
1answer
45 views

htaccess rewrite url

is it possible to create a 301 redirect for the following URL string: Original URL: http://www.example.com/old/old-directory/blog-post-1.html Desired destination URL: http://www.example.com/new/new-...
3
votes
1answer
88 views

blog/index.php/author/ how to create this kind of a URL for my php page?

WordPress blog URL has this notation. chapter .php there is another path. it is not an actual existing directory on the server. my question is how they do that? can I do something like that on my ...
2
votes
0answers
349 views

How to use .htaccess rewrite rules to remove .php and folders from URLs?

I'm trying to simplify the URLs using rewrite condtions and rules on my local WAMP website. For example I would like to have /ProjetSyntheseFAC/mammiferes instead of /ProjetSyntheseFAC/pages/animaux/...
3
votes
2answers
58 views

How to correctly update a Wordpress URL?

I have a WordPress website which has a lot of very well position URL but unfortunately, they all have the id on the URL instead of a friendly URL. I am working on a new website but I will like to ...
1
vote
1answer
1k views

How do I use URL redirection with reverse proxy?

My requirement is to redirect the URL, which is running on port 80 with reverse proxy. I guess I would have to use URL redirection, reverse proxy together. There is already a web-domain active like : ...
2
votes
2answers
71 views

.htaccess RewriteRule leading to unexpected page

I'm trying to do a simple invisible redirection with .htaccess which almost work. I'd like my main domain name example.com to access the content of the folder example.com/V8/ but keeping only the ...
1
vote
2answers
207 views

Do URL parameters create different URLs from Google's SEO perspective?

I have the following 4 URLs. Are all these the same URL or different URLs from Google's SEO perspective? (Having a different query string makes it another URL?) https://www.example.com/buy-web-...
2
votes
1answer
106 views

URL rewrite problem on IIS7.5

My aim is to create Friendly URLs for a website hosted on IIS 7.5. The site has 3 pages with the following URLs: http://www.example.com/contact.php?langid=1&title=contact http://www.example.com/...
1
vote
3answers
81 views

Will shortening a URL hurt my SEO?

Will I mess up my SEO if I remove a part of my URL, even if it still takes you to the same page? An example is: example.com/services/nc/clt/charlotte-nc/... And I want to take out the "services" ...
2
votes
2answers
3k views

How to remove subdirectory folders from the url using htaccess

I am trying to remove the sub-folders from my site URL. Below is the structure of my folders. I am not sure where to place my .htaccess file and what to have written in it: mysiteroot ...
1
vote
0answers
178 views

IIS showing 404 error for CakePHP routing prefixes for instance located in subfolder

I have this Single Page Application built using AngularJS that resides in the document root. The SPA communicates with an API built using CakePHP 3.5.x. The CakePHP instance resides in a folder named ...
0
votes
0answers
37 views

Nginx rewrite for wp-includes works but not the one for content/uploads

I want to perform a few rewrites: this actually works: rewrite ^/includes/(.*) /wordpress/wp-includes/$1?putyo_happybits=administrator last; and I get this: http://everhide.wordpress.dev/includes/...
2
votes
1answer
71 views

Enabling Multiviews is how you make a web server able to open links with missing extensions?

I'm in the process of switching web hosts. My old host was of the beginner-friendly 'kid gloves' variety. I had less control, but it took care of a lot of things behind the scenes. My new web host ...
3
votes
1answer
2k views

Nginx: set Content-Type by URI problem

I'm setting up small personal file hosting, I made a backend to store uploaded files by their hash directly on the HDD like /f/ab/cd/ef012345678..., but without file extensions and generate an URI ...
2
votes
1answer
38 views

Asked to authenticated WebDav twice when connecting to HTTPS

I'm having the problem of double authentification on my Apache server like he has: Properly Force SSL with .htaccess But I want to do this via the conf files. He says he knows how to do it via conf ...
2
votes
0answers
85 views

.htaccess to show a page from the main site on another domain

I have 2 x domain names https://www.example.com - This is my main site. http://www.example-liverpool.com This is my Liverpool sub website example.com/liverpool I've presently got URL forwarding ...
0
votes
2answers
638 views

Apache .htaccess: Is it possible to write an if condition for a cookie value check?

I want to write an if condition in an .htaccess file to check whether a cookie value is set. Example code: <If "%{HTTP_COOKIE} == 'cookiename and value'"> ... </If>