All Questions
95 questions
0
votes
0
answers
46
views
How solving the problem with three slashes in WordPress URLs
I'm writing because I have a problem that I can't find a solution to.
Google Search Console tells me that my site has over 30 pages in the "Page crawled, but not currently indexed" section. ...
3
votes
2
answers
651
views
Building a webcomic: How to redirect URL to latest slug using htaccess?
I'm inexperienced with coding.
I have a comic that creates new pages as /?pg=pagenumber
I want visitors to be redirected to the latest page. So when they type: https://example.com they get redirected ...
1
vote
0
answers
31
views
Browser appends a '?' to links on page, but the '?' does not appear in the source [closed]
I'm a little puzzled with the following problem:
When I hover over a link a WordPress site I'm looking after, I can see that the URL is https://xxxxxxx.com/apply-now/?
All the links on the page have ...
4
votes
2
answers
814
views
Google didn't update the search results after changing a URL with a permanent redirect
I have a simple personal webpage which I use to list my publications and link the corresponding PDFs (I work in academia). Until now, this webpage was hosted by my university:
http(s)://...
1
vote
1
answer
4k
views
How to replace '?' and `=` with slashes in a URL using .htaccess?
How to replace ? and = with / in the URL? I think it may be in .htaccess.
Example:
example.com/public/Micheal-Smith would look like example.com?public=Micheal-Smith if I didn't replace the ? and = ...
2
votes
1
answer
80
views
Can I create a keyword subdirectory for my home page to help SEO?
My website consists of an English-language Homepage (my index.html file), and a German and Russian translation of this page (de.html + ru.html), which are accessible through a button on the top-right.
...
1
vote
1
answer
255
views
How to add trailing slashes to links in my pages from .htaccess in addition to the redirects I've implemented?
I've recently appended the trailing slash at the end of the URL by using this .htaccess code:
#add trailing slashes
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^...
0
votes
0
answers
43
views
Redirect 301 issue with URLs containing question marks [duplicate]
I'm trying to do some basic point to point redirects using 301 redirect 301 with a .htaccess.
All is going well but there is one type of URL that is not happy.
I'm trying to go from:
http://www....
3
votes
1
answer
680
views
Non-existent subdirectories of index.php do not return "404 not found"
My website usually correctly returns 404 not found errors if I enter names of documents or folders that do not exist.
However, I have recently noticed something strange. The homepage of my website is ...
1
vote
1
answer
45
views
How redirect directly to the final domain URL rather than a chain through variations of `www` and `https`?
When I type example.com in the URL it first redirects to http://example.com then to https://example.com and finally to the https://www.example.com (the original address).
Why doesn't it straight away ...
2
votes
1
answer
44
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 ...
2
votes
0
answers
157
views
invoke a URL Perl script silently, without changing URL visible to client
I've been fighting the Google canonical page algorithm bug for 2+ months. Following various forum advice and suggestions haven't solved it yet, although for sure they've made our website better. One ...
1
vote
1
answer
298
views
How to ignore/redirect all URLs matching a certain string
I am using the WordPress plugin, Timely All-in-One events calendar. Unfortunately it is creating a plethora of duplicate URLs which end in strings like
https://www.example.com/events/action~agenda/...
4
votes
1
answer
658
views
Redirect domain name to a specific page
I have theses domain names installed:
Main domain name: www.example.com
Others domains:
www.example.org
www.example.fr
www.animals.example
I first made a rule on my .htaccess to redirect all ...
1
vote
1
answer
260
views
FrontController dosen´t work
i have a example FrontController, its really simple.
index.php:
if (isset($_GET['page'])) {
$requested_page = $_GET['page'];
} else {
$requested_page = 'home';
}
switch($requested_page) {
...
2
votes
1
answer
60
views
Redirecting /page/*/ to the home page in .htaccess
My problem is that my homepage exists on https://www.example.com/page/2/, /3/, /4/ and so on, it still exists on /1000/. Same duplicate page versions exists on /about and and /contact page of my site.
...
3
votes
1
answer
6k
views
Multiple rules to rewrite the url
Why both rules don't work together and how can i fix it? Only the first one works... I think that there's a conflict between the two rules, but i did not found a solution yet
?p= is the querystring i ...
2
votes
1
answer
2k
views
How to have .htaccess display 404.html for child pages
I am working on a website example.com that has an error page example.com/404.html.
Here's my entire .htaccess file (Apache):
# Forces HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(....
3
votes
1
answer
752
views
Are there any tools in Google Search Console for removing URLs with 301 redirects?
In Google Search Console, I am getting 15-20 all different URLs in 404 section which is not in proper format(this URL is too old around 6-7 years and there is no 'Linked from' for this URLs). I want ...
1
vote
1
answer
2k
views
"Content Encoding Error" when refreshing a page with a tracking parameter
Our email marketing system tracks clicks by appending a unique string after links within the email i.e. www.example.com/buy-now?tracking1 & www.example.com/buy-now?tracking2 etc.
The problem is: ...
4
votes
6
answers
303
views
Should my users' profile page URL be /user/bob or just /bob?
Currently, the URL to a user's page is this:
website.com/user/bob
But I'm considering changing this to be:
website.com/bob
Without the /user/ part. It comes across as much cleaner and easier to ...
1
vote
2
answers
53
views
Rename translated documents into ending language initials
I am building a web app and trying to add two languages to the website. So I will make the same documents ending in -gr. Some examples of the files look like this:
English Language paths:
www....
1
vote
1
answer
133
views
Use .htaccess to make pretty URLs that expand abbreviation codes
Yes, I know, there are tons of questions like this, but I can't find one which solves my problem so at cost of receiving downvotes I'm going to ask this again. Even a duplicate link may help me.
This ...
1
vote
0
answers
141
views
How do I create flat link URL with .htaccess [closed]
I am relatively new to URL rewriting. I recently created a forum and wishes to rewrite some of the thread URLs.
I want to internally rewrite this link
www.example.com/306/slug-title/6
(on client ...
5
votes
1
answer
6k
views
rewrite url - remove trailing / if any and add .php
I have a simple question, yet I've found no posts that answer my question. I need an htaccess file that rewrites the urls so that it removes the ending / if any, and adds .php no matter what the ...
1
vote
1
answer
325
views
How to set up URL masking on gh-pages and GoDaddy
I have a domain that currently redirects www.example.com to example.com.
It is hosted on gh-pages.
However, there is a resource link I access from index.html called privacy.html via <a href=...
2
votes
1
answer
2k
views
Removing slash from directory URL
I need to somehow remove the last slash in my directory URLs. For example, instead of example.com/projects/, I'd like to see example.com/projects. I have been trying many solutions with no luck so far....
3
votes
1
answer
345
views
Issue with 301 redirect to Index page only
I have a bunch of 301 redirects in my .htaccess for old pages, which work great.
But a problem that's been plaguing me for years is that there's a lot of links out there to my old index page (index....
2
votes
2
answers
2k
views
How to redirect urls without cpanel access
My client is a CPA firm that had a website built with a CPA site builder company. They no longer want that site, but I have earned them good rank with many of their local keywords. We have designed a ...
3
votes
1
answer
2k
views
How to remove .jsp extension and replace with forward Slash in htaccess?
I want to remove the .jsp extension from my URL and replace it with a forward slash eg. example.com/xyz.jsp to example.com/xyz/ and example.com/xyz.jsp?ab=12 to example.com/xyz/?ab=12.
I used:
...
4
votes
2
answers
2k
views
How to correctly remove MULTIPLE parameters from the Google index using htaccess and canonical / noindex?
I found a similar question with a great answer for removing a single URL parameter. However, what if I have 20+ URL parameters that I don't want indexed?
Also, in the example solution below, it is ...
0
votes
1
answer
64
views
File priority in Joomla website
I have a Joomla site which is hosted on a Linux server which has 2 files, sitemap.xml and sitemap.html. When I try to access example.com/sitemap, sitemap.xml shows up instead of sitemap.html. Can ...
1
vote
0
answers
928
views
website redirecting to com.com [closed]
Just realized that my website - http://www.example.com is being re-directed to http://example.com.com. The http://example.com version is working fine though. Below is the redirect chain:
http://www....
2
votes
1
answer
483
views
My users are getting 302 Found page if they don't write https in address bar, how can I prevent this?
I host a forum website in DigitalOcean's cloud servers, using Ubuntu 16.04, Apache 2.4.20, PHP 7.0.8 and MySQL 5.7.12.
I tried to troubleshoot with cURL about what is the problem, these are the ...
1
vote
1
answer
93
views
website marked as "may be hacked" by google
My website is marked by google as "may be hacked". Through the admin panel of google search console, I see several links that are list as "URL injections".
My site is built with opencart. As you can ...
3
votes
1
answer
2k
views
.htaccess redirect url to a subfolder on a subdomain with exceptions
I have a CMS installed on a subdomain (say blog.domain.com). I created a site on it but the site can be accessed at (blog.domain.com/sites/mysite). I also have to use other links like blog.domain.com/#...
2
votes
2
answers
1k
views
How do I link to web pages with umlauts in their filename?
I am trying to create an HTML link to a web page hosted on an Apache server that contains umlauts (in my test case it is ä.html).
So I tried the following in HTML:
<a href='ä.html'>ä.html</...
2
votes
2
answers
2k
views
Rewrite rule for pretty URL: redirecting 'index.php?parameter' to 'slug/index.html'
My original URL is:
http://example.com/video_in.php?video_id=1
and I want my link to be:
http://example.com/shaandaar/kinna_sona.html
shaandaar and kinna_sona are the slugs in my database.
...
3
votes
2
answers
578
views
Writing clean urls with .htaccess
Update - Alright thanks everyone for your tests, it really helped. The code is good. My problem was not having absolute "/" links. (Due to moving from public_html folder).
Only 2 concerns i have now. ...
0
votes
2
answers
186
views
Non-www to www Redirects
I'm trying to redirect my main domain non-www to www but I have this error; my add on domain redirects like this:
http://www.example.org/example.org/
How can I redirect my main domain without ...
1
vote
1
answer
2k
views
How to redirect the root of a directory in .htaccess without also redirecting all the contents?
I have two specific URL which are being redirected with 301 redirect in my .htaccess file like below:
redirect 301 /old-url-1/ http://www.domain.com/new-url-3/
redirect 301 /old-url-2/ http://www....
0
votes
1
answer
906
views
Vanity URLs with .htaccess and PHP?
I need to create a vanity URL redirect using htaccess and PHP.
My requirements are:
If a user writes example.com/users/foobar
The client will be redirected to for example:
profile.php?user=foobar in ...
1
vote
2
answers
514
views
Friendly URLs with .htaccess
I'm have the following .htaccess:
RewriteEngine on
RewriteCond %{request_filename} -f
RewriteRule ^(.*) $1 [L]
RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L]
My ...
1
vote
1
answer
280
views
How to keep friendly URLs consistent?
I downloaded a site with a crawler script (HTTrack) and now have a few hundred HTML files that need to be edited and re-deployed.
The original site ran on a combination of Drupal and a lesser known, ...
1
vote
1
answer
58
views
Link re-interpreted by browser does not work
I have a problem with links generated by php, for example this link works:
http://masterarbeit-im-unternehmen.de/Thema_Analyse-und-Darstellung-der-%C3%B6kologischen-Vorteile-des-Remanufacturings-f%...
1
vote
1
answer
627
views
Why Google indexed the preview URL of domain?
I have some problems when the web host updated the plesk desk and the server.
I looked to see which pages are indexed site:www.charchas.gr and then I looked for the preview site:charchas.gr.193-92-...
1
vote
1
answer
2k
views
What is the htaccess code for a clean URL for a user profile page?
I have tried code given on under topic clean URLs using .htaccess, but it is nor working on my website.
Actually I am getting static content, but not getting parameters (dynamic content.) My ....
1
vote
1
answer
269
views
Removing "product.php" in URL using .htaccess
The current URL: http://www.example.com/product.php/sample-product.html.
I want change it to: http://www.example.com/sample-product.html
1
vote
5
answers
25k
views
Remove folder name from rewritten URLs
Consider this URL:
http://example.com/gallery/20141111-some-title
In this URL I want to hide gallery/:
http://example.com/20141111-some-title
How can I achieve this using mod_rewrite?
I used ...
4
votes
1
answer
4k
views
Can .htaccess 301 redirects work with encoded characters?
I have an old site with titles in the URL for SEO, but it has URL encoded characters than transliterated Latin characters. Like %20 instead of space character and many other non-Latin characters. The ...