Tag Info

Hot answers tagged

4

In your root .htaccess, using mod_alias: Redirect 301 /home / However, if you are already using mod_rewrite (very likely that you are if this is still a Joomla site) then you should use mod_rewrite: RewriteEngine On RewriteRule ^home/(.*) /$1 [R=301,L] Nothing else to do in Google Search Console (formerly known as "Google Webmaster Tools").


3

This assumes that p, id or catid always appears at the start of the query string, and that the value of this parameter is the "file" basename in the new URL, as per your code examples. RewriteEngine On RewriteCond %{QUERY_STRING} ^(p|id|catid)=(\d+) RewriteRule ^$ /%2.php? [R=301,L] The ^$ pattern only processes requests for the document root (ie. ...


2

RedirectMatch 301 ^/store/$ http://example.com it only redirects example.com/store/ (with forward slash after store) Which is exactly what the "forward slash after store" is saying in your RedirectMatch pattern. However, you should not mix RedirectMatch (mod_alias) with RewriteRule (mod_rewrite) redirects. Different modules execute at different times, ...


2

Have mod_rewrite installed and try this: RewriteEngine On RewriteCond %{REQUEST_URI} !^(.*).png [NC] RewriteCond %{REQUEST_URI} !^(.*).jpg [NC] RewriteCond %{REQUEST_URI} !/index.html [NC] RewriteCond %{REQUEST_URI} !^(.*).css [NC] RewriteRule ^(.*)$ - [R=503,L] ErrorDocument 503 /index.html Header always set Retry-After "604800" The 4th line checks the ...


2

RewriteRule ^login$ /login.php? [L,R=301] You need to remove the ? on the end of the RewriteRule substitution. This is effectively creating an empty query string, removing anything that is passed in the request. RewriteRule ^login$ /login.php [L,R=301]


1

Problem is, when I want to open these files via my website, I get an error, because the link to the file is a direct link An ordinary link on your website is not a direct link. If the browser is sending any referer at all then when a user clicks a link on your website then the referer is "your website". If you are not getting a referer header in this ...


1

I figured out how to solve the second part of the question where the ID= was found at the end like the following: example.com/index.php/archived-content?id=206 by adding a line to the .htaccess like: RewriteCond %{QUERY_STRING} ^id=206 RewriteRule (.*) /some-file-name.php? [R=301,L]


1

You can redirect your site from www to non-www version by 2 diff. ways : First Method is RewriteCond %{HTTP_HOST} ^www\.example\.com [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] You can use above code in you Htaccess. But it will be something like hardcoded code as you have to specify domain name. It will work fine. Second Method is : ...


1

RewriteRule ^test-music\.html$ /music/ [L,R=301]


1

Very easy, this is something you can easily find and figure out yourself. # Check if the url STARTS WITH (is what the ^ does) '/test-music' RewriteCond %{REQUEST_URI} ^/test-music # redirect it, 301 style, Last line (we go away, no need to do the rest of the htaccess) RewriteRule ^(.*) /music/ [L,R=301]


1

Starting on line 322 of your custom.js file you have this code as part of the carousel render: var u=window.location.pathname; u=u.substring(0,u.lastIndexOf("/")+1); u+="Thema_"+encodeURIComponent(tpquestions[curidx].name)+"-"+tpquestions[curidx].id+".html"; if(!X4.config.isuser) window.history.replaceState({qid:tpquestions[curidx].id},"",u); The code ...


1

Even cPanel File Manager shows the same thing. In the popup dialog that opens before getting to the file manager itself you need to make sure that "Show Hidden Files (dotfiles)" is checked. Unfortunately, if you've previously checked "Skip this question" or you simply don't get this option then a similar option does not seem to be available in the ...


1

On the end of the URL when in the file manager, add &showhidden=1. This will show you hidden "dotfiles" (Files beginning with a .) Like so: https://example.com:2083/cpsess1234567890/frontend/x3/filemanager/index.html?dir=/public_html&showhidden=1



Only top voted, non community-wiki answers of a minimum length are eligible