301 for "index.php" in Web.config?
-
Hi there, I'm trying to create a 301 redirect for the file "index.php" but I keep getting a "fail to redirect" message in Firefox whenever I insert it into the Web.config file.
<location path="index.php"></location>
Is there anyway around this? Thanks for any help
According to Open Site Explorer, there are about 500 links to my index file but it only has a 302 status so will not be passing link juice.
-
Hi Alan,
Thanks for that, it worked perfectly!
-
Yannick seems to have it right, but here is another way
<system.webserver><rewrite><rules><rule name="DefaultRule" stopprocessing="true"><match url="^index.php"><action type="Redirect" url="/" =""></action></match></rule></rules></rewrite></system.webserver>
-
Did you add/activate all the right plugins/dll files?
-
Thanks Yannick,
I'm using the configuration tag and there isn't a CMS being used. The page is accessible via index.php, but I'm currently redirecting it using a PHP script (this is fine but it doesn't provide a 301 redirect).
I'd hopefully like to replace this using the web.config file but it only results in an internal server error or an infinite loop.
Thanks again.
-
<configuration><location path="index.php"></location></configuration>
Did you add the configuration part?
Is your home page available on the / part of your domain? Or is it only accessible via index.php? What CMS are you using?
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Combining variants of "last modified", cache-duration etc
Hiya, As you know, you can specify the date of the last change of a document in various places, for example the sitemap, the http-header, ETag and also add an "expected" change, for example Cache-Duration via header/htaccess (or even the changefreq in the sitemap). Is it advisable or rather detrimental to use multiple variants that essentially tell browser/search engines the same thing? I.e. should I send a lastmod header AND ETag AND maybe something else? Should I send a cache duration at all if I send a lastmod? (Assume that I can keep them correct and consistent as the data for each will come from the very same place.) Also: Are there any clear recommendations on what change-indicating method should be used? Thanks for your answers! Nico
Technical SEO | | netzkern_AG0 -
Keyword use in city specific "homepages"
My company, RightFit Personal Training, is a marketplace for people to find independent personal trainers based on preference. I am currently in the process of expanding nationally, and each city essentially has it's own homepage. Currently, the url of each city page ends in the name of the city only. For example, the url for the Houston page is www.rightfitpersonaltraining.com/houston/. The issue here is that I actually wanted my contracted developer to add the state abbreviation as well as the words "personal trainers" to the end of each city page url. So what I really wanted to see out of the Houston personal training page was www.rightfitpersonaltraining.com/houston/tx/personal/trainers. Do you think it is worth it for me have my developer go back and change the URL structure of the city homepages to reflect the latter? This should also benefit the structure of the personal trainer profiles, because they could all fall under their specific city homepages. For example, I think it would be to my benefit if each trainer profile url ended in /city/state/personal/trainer/trainername. Thoughts?
Technical SEO | | mkornbl20 -
Do I need to verify my site on webmaster both with and without the "www." at the start?
As per title, is it necessary to verify a site on webmaster twice, with and without the "www"? I only ask as I'm about to submit a disavow request, and have just read this: NB: Make sure you verify both the http:website.com and http://www.website.com versions of your site and submit the links disavow file for each. Google has said that they view these as completely different sites so it’s important not to forget this step. (here) Is there anything in this? It strikes me as more than a bit odd that you need to submit a site twice.
Technical SEO | | mgane0 -
How can I Style Long "List Posts" in Wordpress?
Hi All, I have been working on a list-post which spans over 100 items. Each item on the list has a quick blurb to explain it, an image and a few resource links. I am trying to find an attractive way to present this long list post in Wordpress. I have seen several sites with long list posts however; they place their items one on top of the other which yields a VERY long page and the end user has to do a lot of scrolling. Others turn their lists into slideshows, but I have no data on how slides perform against 10-mile-long-lists which load in 1 page. I would like to do something similar to what List25.com does as they present about 5-10 items per page and they seem to have pagination. The pagination part I understand however; is there a shortcode plugin to format lists in an attractive way just like list25?
Technical SEO | | IvanC0 -
We are still seeing duplicate content on SEOmoz even though we have marked those pages as "noindex, follow." Any ideas why?
We have many pages on our website that have been set to "no index, follow." However, SEOmoz is indexing them as duplicate content. Why is that?
Technical SEO | | cmaseattle0 -
I have a site that has both http:// and https:// versions indexed, e.g. https://www.homepage.com/ and http://www.homepage.com/. How do I de-index the https// versions without losing the link juice that is going to the https://homepage.com/ pages?
I can't 301 https// to http:// since there are some form pages that need to be https:// The site has 20,000 + pages so individually 301ing each page would be a nightmare. Any suggestions would be greatly appreciated.
Technical SEO | | fthead90 -
Domain with or without "www"
Does it influence the search engine result if we have our domain name without the "www." ?
Technical SEO | | netbuilder0 -
Is "last modified" time in XML Sitemaps important?
My Tech lead is concerned that his use of a script to generate XML sitemaps for some client sites may be causing negative issues for those sites. His concern centers around the fact that the script generates a sitemap which indicates that every URL page in the site was last modified at the exact same date and time. I have never heard anything to indicate that this might be a problem, but I do know that the sitemaps I generate for other client sites can choose server response or not. What is the best way to generate the sitemap? Last mod from actual time modified, or all set at one date and time?
Technical SEO | | ShaMenz0