skip to Main Content

Applying multiple rules with .htaccess – SEO

My current .htaccess looks like this, and currently has the function of ensuring https-access: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> But, I want it to do more than that, as my current link-structure isn't…

VIEW QUESTION

What is the meaning of ^ and $ in Apache HTTPD RewriteRule?

I have successfully added the following code to my Apache HTTPD configuration: # Force www. RewriteCond %{HTTP_HOST} !^www. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] # Force https (SSL) RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Although it works as expected, I have…

VIEW QUESTION

Redirect the old url to newly url – Apache

I am facing a problem in redirecting from old url structure to new url structure This is the old URL: https://example.com/user?username=ganesh And this is the new URL: https://example.com/user/ganesh Actually I rewrite the old URL to a new URL successfully with…

VIEW QUESTION

.htaccess rewrite cond/rule and hide url paremeters – Apache

I got a htaccess in my Root directory. My files path http://example.com/folder1/folder2/index.php?country=eu&lang=en I made this in htaccess. RewriteCond %{HTTP_HOST} ^(www.)?anothersite.com$ RewriteRule ^([^/]*)/([^/]*)$ /folder1/folder2/index.php?country=$1&lang=$2 [L] RewriteRule ^([^/]*)$ /folder1/folder2/index.php [L] And looks like this http://example.com/index.php?country=eu&lang=en But i want like this -> http://example.com/eu-en…

VIEW QUESTION
Back To Top
Search