Search the Community

Showing results for tags '301'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Categories

There are no results to display.


Found 11 results

  1. Hey all, things had been going well remapping a site from one domain to another, but hit a snag and have searched for hours and don't know how to continue. 1) I was moving everything from thepaleofix.com to dranthonygustin.com 2) I moved every single path individually with redirects like this: Redirect 301 /category/post http://www.dranthonygustin.com/category/post Everything smooth sailing until today when through webmaster tools (to say site address as moved) I had to execute "Redirect 301 / http://www.dranthonygustin.com" -- now some of the urls go through and some don't include the / after the .com extension. For example: http://www.thepaleofix.com > http://www.dranthonygustin.com no problem http://www.thepaleofix.com/resource/purepharma-m3-review/ > http://www.dranthonygustin.com/what-does-magnesium-do/ no problem BUT a bunch of the URLs then don't push... For example: http://www.thepaleofix.com/recipe/paleo-jam > http://www.dranthonygustin.comrecipe/paleo-jam/ (notice NO / after the .com extension) and http://www.thepaleofix.com/wp-admin > http://www.dranthonygustinwp-admin (which of course leads to dead link) There are a bunch of paths that do this, that I checked before and were working, such as: Redirect 301 /recipe/paleo-jam http://www.dranthonygustin.com/simple-vanilla-berry-paleo-jam/ Any idea why after implementing the / redirect, why it broke some of the redirects and not all? Thanks!
  2. Hello All, I was hoping someone could help me with a Redirect issue. I have a new site created that is replacing an old version. We got rid of a bunch of subpages and are trying to get the old URLs to relink to the corresponding new pages. This works on some of them, bringing them back to he main page and a certain section (its a one page scrolling site for the most part) but the ones that are supposed to go to the sub-pages are not working. I have tired a bunch of different permutations with no luck. The old site used Wordpress and the current one does not, if that is a factor. This is my first real site-build, so any help would be greatly appreciated - thanks! Here is the code I am trying to use, the redirects work properly up through the 'Careers' section: Options +FollowSymLinks RewriteEngine on #301 Redirect Old File Redirect 301 /contact http://www.mngdirect.com/#contact Redirect 301 /about http://www.mngdirect.com Redirect 301 /careers http://www.mngdirect.com/#careers Redirect 301 /our-team http://www.mngdirect.com/#teams Redirect 301 /about/careers http://www.mngdirect.com/#careers Redirect 301 /solutions/eventdirect http://www.mngdirect.com/eventdirect Redirect 301 /solutions/marketingdirect http://www.mngdirect.com/marketingdirect Redirect 301 /solutions/eventdirect/eventdirect-peer-to-peer/ http://www.mngdirect.com/eventdirect Redirect 301 /solutions/eventdirect/eventdirect-advisory-board/ http://www.mngdirect.com/eventdirect Redirect 301 /solutions/eventdirect/eventdirect-broadcast/ http://www.mngdirect.com/eventdirect Redirect 301 /solutions/eventdirect/eventdirect-speaker-training/ http://www.mngdirect.com/eventdirect Redirect 301 /solutions/marketingdirect/marketingdirect-triggered-formulary-campaigns/ http://www.mngdirect.com/marketingdirect Redirect 301 /solutions/marketingdirect/marketingdirect-triggered-attendee-campaigns/ http://www.mngdirect.com/marketingdirect Redirect 301 /solutions/marketingdirect/marketingdirect-scheduled-speaker-campaigns/ http://www.mngdirect.com/marketingdirect Redirect 301 /solutions/marketingdirect/marketingdirect-scheduled-target-campaigns/ http://www.mngdirect.com/marketingdirect Redirect 301 /solutions/marketingdirect/marketingdirect-triggered-rep-campaigns/ http://www.mngdirect.com/marketingdirect Redirect 301 /solutions/marketingdirect/marketingdirect-triggered-behavior-campaigns/ http://www.mngdirect.com/marketingdirect #RedirectMatch 301 ^/solutions/ http://www.mngdirect.com/#solutions #error 404 ErrorDocument 404 /404.html -Nate
  3. I moved an old site to processwire and want to redirect the old URLs with php-filenames to the new folders via .htaccess to match the new structure. I tried: RedirectMatch 301 /filename.php http://example.com/filename/ The Browser end up like this: http://example.com/filename/?it=filename.php Its interfering with that Processwire .htaccess rule # ----------------------------------------------------------------------------------------------- # Pass control to ProcessWire if all the above directives allow us to this point. # For regular VirtualHosts (most installs) # ----------------------------------------------------------------------------------------------- RewriteRule ^(.*)$ index.php?it=$1 [L,QSA] If i comment that out the redirect in the URL is ok, but every Klick on a websitelink is showing the homepage. Any idea how i can fix this? Thanks Andreas
  4. Hi there, I want to 301 redirect the following: http://www.example.com/folder-name1/ to http://www.example.com/folder-name1/index.php/folder-name2/ Is that possible with htaccess? Which code should I use Thanks in advance for your answers
  5. hi, i have a question, which i should be able to work out with htaccess, i just wanted to ask, if there's an easier way using processwire: i set up a new site using processwire with multilang etc. since a lot of stuff changed on the website (contents, hierachy, ...) there's now also a different domain structure. the old structure was: www.example.com/outlet-1 and now it's www.example.com/en/find-us/outlet-1 is there any way i can do a (temporary) 301 redirect, without having to remodel to the whole structure? the main reason for this is, that there are still tons of flyers and other advertising materials with this domain structure (transitionphase should end in <6months) the whole thing comes down to about 4-5 pages -- so nothing really drastic. also if there's no way in doing this with processwire, help with a proper RewriteRule for htaccess would be greatly appreciated. current workaround doesnt really do the trick. thanks so far!
  6. Hi! How to make 301 redirect from www.site.com/news/hereisthepost/ to www.site.com/blog/hereisthepost/ ?
  7. Hi! I'm no php expert but I thought I should share my way of redirecting URLs from my old site setup. I'm going to use Drupal urls in this example, but should work for any url. I can't guarantee this is the best way of doing it, so please feel free to correct me if you have feedback regarding security, speed or similar. Step 1: Make sure that each page in PW has some kind of connection to its previous URL so it can recognize when a redirect needs to be done. I'm going to use the node id:s and taxonomy id:s that my pages had when they were located in Drupal. I've made sure to save them all into each processwire page in a field called "drupal_id". Maybe you could just save the old URL in a field when migrating and use that, as an alternative. Step 2: Open head.inc and add this to the very top: $thisurl = $sanitizer->url("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"); // Check if the URL reminds you of the old url scheme if (preg_match("/com\/\?q=/", $thisurl)){ // if it looks like a node url if (preg_match("/\?q=node\/[0-9]*/", $thisurl, $nodeslug)){ $oldnid = preg_replace("/\?q=node\//", "", $nodeslug[0]); if ($match = $pages->get("drupal_id={$oldnid}")){ $session->redirect($match->httpUrl); } else { $session->redirect($config->urls->root); } // If it's a taxonomy url } elseif (preg_match("/\?q=taxonomy\/term\/[0-9]*/", $thisurl, $taxonomyslug)) { $oldtid = preg_replace("/\?q=taxonomy\/term\//", "", $taxonomyslug[0]); if ($match = $pages->get("drupal_id={$oldtid}")){ $session->redirect($match->httpUrl); } else { $session->redirect($config->urls->root); } } else { $session->redirect($config->urls->root); } } Regex is used to find URL schemes and extract drupal nids and tids from the url. These are then looked up using the api, only to return the new url. Each time the url redirect fails, it might be suitable presenting a warning to the user. I've added something like $session->message("This URL seems to have changed. Please use the search if you didn't find what you were looking for") on the line before redirect (not part of the code example above, for simplicity's sake). Hope this can be useful for someone else, too. And again, feel free to leave feedback! I'm here to learn, too
  8. I built best-of-scotland.co.uk on Processwire and have a redirect problem. Tried method 1: If I add the line to the .htaccess file I get a site error. At the bottom or the top of the file I tried adding Redirect 301 /index.php/contact http://best-of-scotland.co.uk/contact/ Tried Method 2: Using the redirect module (http://modules.processwire.com/modules/process-redirects/) does not seem to work at all. For example this page http://www.best-of-scotland.co.uk/index.php/contact was the old page and we are trying to get it to redirect to http://www.best-of-scotland.co.uk/contact. Is there a way to redirect an old site with SEO rewritten URLs to the new site?
  9. Hello, after relaunching a website I want to redirect all my old URLs to the new structure. Here's the problem: When i try to add Redirect 301 /index.html /startseite I get the following result: http://www.domain.de/startseite?it=index.html Is there a simple way to do what I want and get rid of "?it=index.html"? Greets Jens alias DV-JF
  10. Hi, I have a couple of restricted templates using the "Redirect to another URL" if the user doesn't have access. I redirect to a custom login page with the {id} tag. On successful login the user then gets redirected to the page he/she was trying to access in the first place (if the user in question has access to the page). You probably get the point. I now have a user who gets the "too many redirects" browser issue. I haven't been able to reproduce this so it's too early to draw any conclusions. Anyone else having similar issues? Also pw seems to always redirect with a HTTP 301 internally, i.e. the "Redirect to another URL" functionality, and these are cacheable in the browser (http://en.wikipedia.org/wiki/HTTP_301). PHP does however by default add headers that should make the browser not use cache: the no-store, no-cache, expires etc. This would effectively make the 301 (permanent redirect) behave like a 302 (temporary redirect), however the browsers have as far as I know have not been particularly good at following the recommendations regarding cache headers. Is there a reason for always using 301, in the pw core?
  11. Hi there. I'm hosting my site on a friend's domain. In Google, when searching my site, it shows up as me.friendsdomain.com. I want it to show up as mydomain.com. Can I change this somehow using htaccess? If so, which parts of the file do I modify? Thanks.