New answers tagged

0

You need to install url_rewrite plugin for IIS. It is available on IIS7 and up though it will tell you that it only works on IIS7. You will then write the redirect commands in web.config and it is very tricky due to the difference of how url_rewrite handles rewriting. The best option I can suggest is to try it out on a local IIS installation with ...


0

The info-graphic you linked to is misleading. The apparent premise is that you should not redirect to a site if the platform is different, structure changes, design changes, or the content changes. This is about as far from the truth as it can be. Of course there are considerations, but none of these items are game changers. For example, given a structure ...


2

You can have clean URLs with the following step. Install the wiki into http://localhost/w and NOT into http://localhost/wiki then Modify the following in LocalSettings.php after you have set it up: $wgArticlePath = "/wiki/$1"; In the ROOT directory place the following .htaccess file: RewriteEngine on ## uncomment this rule if you want to redirect to ...


1

The important thing is to place your external redirects before the WordPress internal rewrites (as Mike suggests in his answer). The WordPress rewrites are a "catch all" and rewrite everything. So if you place any rewrites/redirects after the WordPress stuff they will simply be ignored. RewriteCond %{HTTP_HOST} ^www\.example\.com$ RewriteRule ^/?$ ...


3

# Use PHP5.4 as default # Changed PHP handler from application/x-httpd-php54 to application/x-httpd-phpbeta on Thu Dec 17 16:50:26 MST 2015. AddHandler application/x-httpd-phpbeta .php # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Insert redirect based rewrites here. # Example: RewriteRule ^redirectme$ ...


0

RewriteRule ^([^/]*)/([^/]*)\.html$ song_in.php?album_id=$1&song_id=$2 [QSA,L] RewriteRule ^([^/]*)/([^/]*)\.html$ video_in.php?album_id=$1&video_id=$2 [QSA,L] You have a conflict with the last two directives. You are using the same pattern for both, so all these requests are going to song_in.php. The second (video_in.php) directive is never ...


0

You could add another condition (RewriteCond directive) to prevent the redirect happening when an IP address has been requested: RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} !^\d RewriteRule (.*) https://www.%{HTTP_HOST}/$1 [R=301,L] When the host does not start with www. and does not start with a numeric digit. Note that you'll need to ...


0

The main site is build on Hype and it's full of animation so it cannot be only one responsive site. That is not true at all. Hype has responsive design features, so you can can update your animation so that it is runs one way on desktops and another way on mobiles while being served within the same page of the same website. Hype itself is literally a ...


2

and I want my link to be: http://example.com/shaandaar/kinna_sona.html shaandaar and kinna_sona are the slugs in my database. What should I write in my .htaccess file? This is the best way: RewriteEngine On RewriteRule ^([^/]+)/([^/]+)\.html$ /video_in.php?firstslug=$1&secondslug=$2 [L] In the RewriteRule, the ^ starts the matching. This: ...


1

...Google identifies index.php and the site's root as a single page These two things can totally be different. ...that redirecting index.php to root is not something we should worry about. I'd personally worry about it because: index.php is not a friendly URL especially if it has a query string attached to it. not having a friendly URL could ...


1

I have client who earns pagerank 2 with the same issue as yours. I redirected index.php as default home page into (even) folder /id/. However, I include canonical as an exact information for google to see ... "where my home address is actually" That means that what google needs is our final decision in related to this. As long as we include meta ...


1

A 302 redirect is a temporary redirect. It passes 0% of link juice (ranking power) and, in most cases, should not be used. It is common practice to redirect one URL to another. When doing this, it is critical to observe best practices in order to maintain SEO value. Source: https://moz.com/learn/seo/redirection


3

It's called adaptive web development. You need to detect the user-agent and serve different markup based on the device. In PHP, you can use $_SERVER['HTTP_USER_AGENT']. You'll want to include this code in order to let Google know what you're up to: <?php Header('Vary: User-Agent'); ?> Here's some more info: ...


0

There's a trade-off here. If you decide to move everything to https then people will have a longer waiting time initially in order for the security certificate to be recognized by the client browser. For now, make one URL the secure version of that URL. Make it start with https:// and run that URL through webpagetest.org and you'll notice either a purple ...


1

For a period, you will see a drop-off in traffic before picking up again. Be prepared for this and make sure that management understands that switching from HTTP to HTTPS comes with a price. In theory, though rarely in practice, HTTP and HTTPS are two separate sites. As the search engine drops the HTTP site and indexes the HTTPS site, there will be a ...


0

Redirecting to the, now, preferred secure version of the same site will have no effect on your ranking. The domain name is the key for search engines. https is the protocol, not the content.


3

After some trys and searches I got it working using: RewriteCond %{DOCUMENT_ROOT}/$2 -f [OR] RewriteCond %{DOCUMENT_ROOT}/$2 -d RewriteRule ^([a-z]{2})/(.+)$ /$2 [L,QSA] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . index.php [L]


1

I use the solution of adding UTM parameters to the redirects. It is the only thing that I've found that works well with Google Analytics. When somebody visits my example.net domain they get redirected to: http://example.com/?utm_campaign=domainnames&utm_medium=domain&utm_source=example.net Then I can get a "campaign" report in Google Analytics ...


1

The rewrite loop is actually caused by rules later in your script: RewriteRule ^(en|it)/(.*) $2?lang=$1 [QSA] RewriteRule ^([^/]+)$ index.php?op=$1 [L,NS,QSA] index.php Having redirected the user to /en/ (with the Accept-Language rules), the first directive here rewrites the request back to ?lang=en (no URL-path) but the second directive then fails to ...


2

This answer comes from memory. If I'm 100% correct with the syntax, you'll want to replaced your 4 commented out lines of code with: RewriteCond %{REQUEST_URI} !^/en(.*)$ RewriteCond %{HTTP:Accept-Language} ^en [NC] RewriteRule ^$ https://www.example.com/en/ [L,R=301] RewriteCond %{REQUEST_URI} !^/it(.*)$ RewriteCond %{HTTP:Accept-Language} ^it [NC] ...


0

Click tracking redirects are fine for SEO as long as they are the "301 permanent" variety. Other types of redirects are not great for SEO: 302 Temporary redirects Meta refresh JavaScript redirects Framed redirects I was unable to find documentation about which type Pardot uses. You can test it using a tool like curl: $ curl --head ...


0

I was recently looking at a similar use of client side redirects. I've used Pardot before for tracking and I'm quite certain that a Pardot redirect uses a meta refresh redirect. Using this type of redirect may have negative SEO effects. I'm not completely sure to what extent (I haven't done testing and could not find any cases when I looked).


0

As long as your redirect chains are of reasonable length, redirect chains are absolutely fine. If you chain 4 or more redirects together Google may start to refuse to follow them. If you chain 10 or more redirects together browsers start to give errors to users. If chained redirects your site to be faster, I would use the chained redirects. As long as ...


1

If the query string is irrelevant then it can simply be ignored. (You can't match the query string anyway with the RewriteRule directive.) Try the following in your root .htaccess file to redirect the request: RewriteEngine On RewriteRule ^index.php/path/some-path/some-subpath$ /category/? [L,R=301] In per-directory .htaccess files, the URL-path matched ...


-2

www.example.com will need replacing with your real URL. You could also try blocking the other URL's using robots.txt


0

Both them are good. But it is better to go with your second option. Edit : After launch your website fully, your aim is to get more traffic to example.com. isn't it? So start to optimize it now. At least you can set title and meta description as your future goal. Then add sign up page to it. When you launch the site you need to have change the content only. ...


3

It is fully normal, that traffic drops after such basic change of URL structure. Google needs time to get the new structure, to re-index pages, to understand, whether the content changed and so on. I would say, the drop time is from 1 up to 5-6 weeks long. But you can speed up the re-indexing with new sitemap and new content, which is backlinked externally. ...


0

I think the software is missing the point of 301 and 302 redirects completely. Their purpose is to act as signposts to actual "documents" with actual content the client is requesting. 301 means the document has permanently moved to a different url 302 means the document has temporarily moved to a different url The scenario you are describing sounds more ...


0

This is a hack that seems to have compromised several MODx Evo out of date installations. I've just fixed one, this is what needed doing: In the MODx Manager, go to Elements > Manage Elements > Plugins > "Quick ManagerManager". Search for the code @eval(@gzuncompress(@str_rot13(@base64_decode( (I found it near the bottom of the file) This is the ...


1

Yeah, what @alfasin said is right. I use WordPress powered website and I want to force my URL to www & HTTPS version. I use ReallySimpleSSL plugin v2.2.12. The plugin add these code to my root .htaccess # BEGIN rlrssslReallySimpleSSL rsssl_version[2.2.12] <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTPS} !=on [NC] RewriteRule ...


0

Google does not include sites in its index that are not available 24 hours a day. If your website is going to be offline for a good portion of the day, search engines are not going to index it. It might be possible for your hosting plan to put up that error message. To do so, it would need to change the DNS entry to point your website to a different ...



Top 50 recent answers are included